mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-24 17:49:52 +01:00
Use ^S instead for screenshots, VK_SNAPSHOT is not sent to WindowProc
This commit is contained in:
parent
aa69dbbb3e
commit
e019401407
10
main.c
10
main.c
@ -302,9 +302,12 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef HAVE_LIBPNG
|
#ifdef HAVE_LIBPNG
|
||||||
else if(wParam == VK_SNAPSHOT)
|
if(wParam == VK_CONTROL || wParam == 0x53 /* S */)
|
||||||
{
|
{
|
||||||
screenshot(ddraw->primary);
|
if(GetAsyncKeyState(VK_CONTROL) & 0x8000 && GetAsyncKeyState(0x53) & 0x8000)
|
||||||
|
{
|
||||||
|
screenshot(ddraw->primary);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
@ -360,6 +363,9 @@ HRESULT __stdcall ddraw_SetCooperativeLevel(IDirectDrawImpl *This, HWND hWnd, DW
|
|||||||
SetPixelFormat( This->render.hDC, ChoosePixelFormat( This->render.hDC, &pfd ), &pfd );
|
SetPixelFormat( This->render.hDC, ChoosePixelFormat( This->render.hDC, &pfd ), &pfd );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GetWindowText(This->hWnd, (LPTSTR)&This->title, sizeof(This->title));
|
||||||
|
printf("wintitle: %s\n", This->title);
|
||||||
|
|
||||||
return DD_OK;
|
return DD_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
1
main.h
1
main.h
@ -41,6 +41,7 @@ typedef struct IDirectDrawImpl
|
|||||||
BOOL windowed_init;
|
BOOL windowed_init;
|
||||||
DEVMODE mode;
|
DEVMODE mode;
|
||||||
struct IDirectDrawSurfaceImpl *primary;
|
struct IDirectDrawSurfaceImpl *primary;
|
||||||
|
char title[128];
|
||||||
|
|
||||||
/* real export from system32\ddraw.dll */
|
/* real export from system32\ddraw.dll */
|
||||||
HRESULT WINAPI (*DirectDrawCreate)(GUID FAR*, LPDIRECTDRAW FAR*, IUnknown FAR*);
|
HRESULT WINAPI (*DirectDrawCreate)(GUID FAR*, LPDIRECTDRAW FAR*, IUnknown FAR*);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user