mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-24 17:49:52 +01:00
configurable screenshot hotkey
This commit is contained in:
parent
3d7f370438
commit
fbdfe63231
9
main.c
9
main.c
@ -388,9 +388,9 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef HAVE_LIBPNG
|
#ifdef HAVE_LIBPNG
|
||||||
if(wParam == VK_CONTROL || wParam == 0x53 /* S */)
|
if(wParam == VK_CONTROL || wParam == ddraw->screenshotKey)
|
||||||
{
|
{
|
||||||
if(GetAsyncKeyState(VK_CONTROL) & 0x8000 && GetAsyncKeyState(0x53) & 0x8000)
|
if(GetAsyncKeyState(VK_CONTROL) & 0x8000 && GetAsyncKeyState(ddraw->screenshotKey) & 0x8000)
|
||||||
{
|
{
|
||||||
screenshot(ddraw->primary);
|
screenshot(ddraw->primary);
|
||||||
return 0;
|
return 0;
|
||||||
@ -701,6 +701,8 @@ HRESULT WINAPI DirectDrawCreate(GUID FAR* lpGUID, LPDIRECTDRAW FAR* lplpDD, IUnk
|
|||||||
"; Windows position, -1 = center to screen\n"
|
"; Windows position, -1 = center to screen\n"
|
||||||
"posX=-1\n"
|
"posX=-1\n"
|
||||||
"posY=-1\n"
|
"posY=-1\n"
|
||||||
|
"; Screenshot Hotkey, default = CTRL + G\n"
|
||||||
|
"screenshotKey=G\n"
|
||||||
, fh);
|
, fh);
|
||||||
fclose(fh);
|
fclose(fh);
|
||||||
}
|
}
|
||||||
@ -735,6 +737,9 @@ HRESULT WINAPI DirectDrawCreate(GUID FAR* lpGUID, LPDIRECTDRAW FAR* lplpDD, IUnk
|
|||||||
This->boxing = TRUE;
|
This->boxing = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GetPrivateProfileStringA("ddraw", "screenshotKey", "G", tmp, sizeof(tmp), This->ini_path);
|
||||||
|
ddraw->screenshotKey = tmp[0];
|
||||||
|
|
||||||
This->render.maxfps = GetPrivateProfileIntA("ddraw", "max_fps", 120, This->ini_path);
|
This->render.maxfps = GetPrivateProfileIntA("ddraw", "max_fps", 120, This->ini_path);
|
||||||
This->render.width = GetPrivateProfileIntA("ddraw", "width", 0, This->ini_path);
|
This->render.width = GetPrivateProfileIntA("ddraw", "width", 0, This->ini_path);
|
||||||
This->render.height = GetPrivateProfileIntA("ddraw", "height", 0, This->ini_path);
|
This->render.height = GetPrivateProfileIntA("ddraw", "height", 0, This->ini_path);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user