Added "mouse" support for the Android touch screen

This commit is contained in:
Sam Lantinga 2011-01-13 18:31:15 -08:00
parent 70c916a415
commit cab4e0652a
7 changed files with 108 additions and 8 deletions

View file

@ -29,6 +29,12 @@
int
Android_CreateWindow(_THIS, SDL_Window * window)
{
if (Android_Window) {
SDL_SetError("Android only supports one window");
return -1;
}
Android_Window = window;
/* Adjust the window data to match the screen */
window->x = 0;
window->y = 0;
@ -47,6 +53,9 @@ Android_SetWindowTitle(_THIS, SDL_Window * window)
void
Android_DestroyWindow(_THIS, SDL_Window * window)
{
if (window == Android_Window) {
Android_Window = NULL;
}
}
/* vi: set ts=4 sw=4 expandtab: */