阻止程序使用 ClipCursor?

发布于 2024-12-13 15:54:48 字数 330 浏览 2 评论 0原文

旧游戏 (Pod) 通过滑行包装器保持活动状态,因此现在可以以大于本机游戏分辨率(640x480)的自定义分辨率运行。 然而,由于滑动包装器的问题,如果游戏以 1920x1080 运行,则光标仅允许在 0, 0, 640, 480 矩形内移动;显然,原始开发人员已为此使用了 WinAPI ClipCursor 函数。 这非常令人讨厌,因为您无法以有用的方式通过鼠标操作游戏菜单,因为并非所有按钮都可以触及。

是否可以全局禁用 ClipCursor() 功能?我是否必须注入一个 DLL(我之前没有完全这样做),或者让 C# 应用程序在后台运行、监视游戏进程并将 ClipCursor() 设置为真实屏幕区域就足够了进程已经开始?

An old game (Pod) is kept alive with a glide wrapper and thus can now be run in custom resolutions larger than the native game resolution which was 640x480.
However, due to problems with the glide wrappers, if the game is run at 1920x1080 for example, the cursor is only allowed to move in a 0, 0, 640, 480 rectangle; obviously the WinAPI ClipCursor function has been used by the original developers for this.
This is pretty nasty because you can't act with the game menu mouse-wise in a useful way since not all buttons can be reached.

Is it possible to disable ClipCursor() functionality globally? Do I have to inject a DLL (I didn't do this completely before) or would it just be enough to let a C# app run in the background, watching for the game process and setting ClipCursor() to the real screen area after the process has been started?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

烟柳画桥 2024-12-20 15:54:48

我严重怀疑它多次调用 ClipCursor() 。尝试编写一个小程序来调用 ClipCursor() 并将其设置回桌面大小。游戏开始后运行该程序。

编辑
根据您的技能水平,您还可以尝试使用 ollydbg 逐步执行程序并找到它调用 ClipCursor() API 的位置,然后插入跳转以跳过它。

I seriously doubt it's calling ClipCursor() more than once. Try writing a small program to call ClipCursor() and set it back to the size of your desktop. Run that program after your game is started.

edit
Depending on your skill level, you could also try using ollydbg to step through the program and find where it's calling the ClipCursor() API, and insert a jump to skip over it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文