ongeki_mouse.zip

添加 ongeki_mouse.exe 到音击的 start.bat,即可在开始游戏前和结束游戏后自动开关"提高指针精确度"选项。

代码如下:

#include <iostream>
#include <windows.h>

using namespace std;

int main()
{
    cout << "开关\"提高指针精确度\"选项\n" << endl;
    
    int mouseParams[3];
    
    SystemParametersInfo(SPI_GETMOUSE, 0, reinterpret_cast<LPVOID>(mouseParams), 0);
    
    cout << "系统设置值: " << mouseParams[2] << ((mouseParams[2] == 0) ? " - 已禁用" : " - 已启用") << endl;
    
    mouseParams[2] = !mouseParams[2];
    
    cout << "当前设置值: " << mouseParams[2] << ((mouseParams[2] == 0) ? " - 已禁用" : " - 已启用") << endl;

    SystemParametersInfo(SPI_SETMOUSE, 0, reinterpret_cast<LPVOID>(mouseParams), SPIF_SENDCHANGE);
    
    return 0;
}