* Fix using fullscreen mode with a tablet.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1553 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
parent
9070ca9b5b
commit
bce1c9d7ee
@ -50,6 +50,7 @@
|
||||
/// Sets the new screen/window dimensions.
|
||||
void Set_mode_SDL(int *width, int *height, int fullscreen)
|
||||
{
|
||||
static SDL_Cursor* cur = NULL;
|
||||
Screen_SDL=SDL_SetVideoMode(*width,*height,8,(fullscreen?SDL_FULLSCREEN:0)|SDL_RESIZABLE);
|
||||
if(Screen_SDL != NULL)
|
||||
{
|
||||
@ -66,7 +67,16 @@ void Set_mode_SDL(int *width, int *height, int fullscreen)
|
||||
{
|
||||
DEBUG("Error: Unable to change video mode!",0);
|
||||
}
|
||||
SDL_ShowCursor(0); // Hide the SDL mouse cursor, we use our own
|
||||
|
||||
// Trick borrowed to Barrage (http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg737265.html) :
|
||||
// Showing the cursor but setting it to fully transparent allows us to get absolute mouse coordinates,
|
||||
// this means we canuse tablet in fullscreen mode.
|
||||
SDL_ShowCursor(1); // Hide the SDL mouse cursor, we use our own
|
||||
|
||||
SDL_FreeCursor(cur);
|
||||
static byte cursorData = 0;
|
||||
cur = SDL_CreateCursor(&cursorData, &cursorData, 1,1,0,0);
|
||||
SDL_SetCursor(cur);
|
||||
}
|
||||
|
||||
#if (UPDATE_METHOD == UPDATE_METHOD_CUMULATED)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user