comparison src/video/android/SDL_androidwindow.c @ 5001:77df56570442

Added "mouse" support for the Android touch screen
author Sam Lantinga <slouken@libsdl.org>
date Thu, 13 Jan 2011 18:31:15 -0800
parents a514bfe6952a
children c66b2a778b7e
comparison
equal deleted inserted replaced
5000:6a10693e66c3 5001:77df56570442
27 #include "SDL_androidwindow.h" 27 #include "SDL_androidwindow.h"
28 28
29 int 29 int
30 Android_CreateWindow(_THIS, SDL_Window * window) 30 Android_CreateWindow(_THIS, SDL_Window * window)
31 { 31 {
32 if (Android_Window) {
33 SDL_SetError("Android only supports one window");
34 return -1;
35 }
36 Android_Window = window;
37
32 /* Adjust the window data to match the screen */ 38 /* Adjust the window data to match the screen */
33 window->x = 0; 39 window->x = 0;
34 window->y = 0; 40 window->y = 0;
35 window->w = Android_ScreenWidth; 41 window->w = Android_ScreenWidth;
36 window->h = Android_ScreenHeight; 42 window->h = Android_ScreenHeight;
45 } 51 }
46 52
47 void 53 void
48 Android_DestroyWindow(_THIS, SDL_Window * window) 54 Android_DestroyWindow(_THIS, SDL_Window * window)
49 { 55 {
56 if (window == Android_Window) {
57 Android_Window = NULL;
58 }
50 } 59 }
51 60
52 /* vi: set ts=4 sw=4 expandtab: */ 61 /* vi: set ts=4 sw=4 expandtab: */