Initial screenshot support for paletted surfaces

This commit is contained in:
Toni Spets 2010-11-20 21:08:17 +02:00
parent 57e7ddf3fc
commit aa69dbbb3e
3 changed files with 101 additions and 1 deletions

11
main.c
View file

@ -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: