diff --git a/ddraw.dll b/ddraw.dll index a977848..65f82a4 100644 Binary files a/ddraw.dll and b/ddraw.dll differ diff --git a/main.c b/main.c index c9c23dd..9bf3010 100644 --- a/main.c +++ b/main.c @@ -388,9 +388,9 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) } } #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); return 0; @@ -701,6 +701,8 @@ HRESULT WINAPI DirectDrawCreate(GUID FAR* lpGUID, LPDIRECTDRAW FAR* lplpDD, IUnk "; Windows position, -1 = center to screen\n" "posX=-1\n" "posY=-1\n" + "; Screenshot Hotkey, default = CTRL + G\n" + "screenshotKey=G\n" , fh); fclose(fh); } @@ -735,6 +737,9 @@ HRESULT WINAPI DirectDrawCreate(GUID FAR* lpGUID, LPDIRECTDRAW FAR* lplpDD, IUnk 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.width = GetPrivateProfileIntA("ddraw", "width", 0, This->ini_path); This->render.height = GetPrivateProfileIntA("ddraw", "height", 0, This->ini_path); diff --git a/main.h b/main.h index de7f658..9440882 100644 --- a/main.h +++ b/main.h @@ -86,6 +86,7 @@ typedef struct IDirectDrawImpl int posX; int posY; char ini_path[MAX_PATH]; + char screenshotKey; } IDirectDrawImpl;