Initial screenshot support for paletted surfaces
This commit is contained in:
parent
57e7ddf3fc
commit
aa69dbbb3e
3 changed files with 101 additions and 1 deletions
11
main.c
11
main.c
|
@ -29,6 +29,11 @@ void mouse_init(HWND);
|
|||
void mouse_lock();
|
||||
void mouse_unlock();
|
||||
|
||||
/* from screenshot.c */
|
||||
#ifdef HAVE_LIBPNG
|
||||
BOOL screenshot(struct IDirectDrawSurfaceImpl *);
|
||||
#endif
|
||||
|
||||
IDirectDrawImpl *ddraw = NULL;
|
||||
|
||||
DWORD WINAPI render_main(void);
|
||||
|
@ -296,6 +301,12 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
mouse_unlock();
|
||||
}
|
||||
}
|
||||
#ifdef HAVE_LIBPNG
|
||||
else if(wParam == VK_SNAPSHOT)
|
||||
{
|
||||
screenshot(ddraw->primary);
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case WM_LBUTTONDOWN:
|
||||
case WM_RBUTTONDOWN:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue