Mercurial > sdl-ios-xcode
comparison src/video/android/SDL_androidvideo.c @ 4980:d9fdff945ec9
A bit of cleanup in the Android driver
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 12 Jan 2011 13:52:41 -0800 |
parents | 604077962776 |
children | 55b82067815b |
comparison
equal
deleted
inserted
replaced
4979:be4ba07d9867 | 4980:d9fdff945ec9 |
---|---|
30 #include "../SDL_pixels_c.h" | 30 #include "../SDL_pixels_c.h" |
31 #include "../../events/SDL_events_c.h" | 31 #include "../../events/SDL_events_c.h" |
32 | 32 |
33 #include "SDL_androidvideo.h" | 33 #include "SDL_androidvideo.h" |
34 #include "SDL_androidevents.h" | 34 #include "SDL_androidevents.h" |
35 #include "SDL_androidkeyboard.h" | |
35 | 36 |
36 #define ANDROID_VID_DRIVER_NAME "Android" | 37 #define ANDROID_VID_DRIVER_NAME "Android" |
37 | 38 |
38 /* Initialization/Query functions */ | 39 /* Initialization/Query functions */ |
39 static int Android_VideoInit(_THIS); | 40 static int Android_VideoInit(_THIS); |
40 static int Android_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode); | |
41 static void Android_VideoQuit(_THIS); | 41 static void Android_VideoQuit(_THIS); |
42 | 42 |
43 /* GL functions (SDL_androidgl.c) */ | 43 /* GL functions (SDL_androidgl.c) */ |
44 extern int Android_GL_LoadLibrary(_THIS, const char *path); | 44 extern int Android_GL_LoadLibrary(_THIS, const char *path); |
45 extern void *Android_GL_GetProcAddress(_THIS, const char *proc); | 45 extern void *Android_GL_GetProcAddress(_THIS, const char *proc); |
91 } | 91 } |
92 | 92 |
93 /* Set the function pointers */ | 93 /* Set the function pointers */ |
94 device->VideoInit = Android_VideoInit; | 94 device->VideoInit = Android_VideoInit; |
95 device->VideoQuit = Android_VideoQuit; | 95 device->VideoQuit = Android_VideoQuit; |
96 device->SetDisplayMode = Android_SetDisplayMode; | |
97 device->PumpEvents = Android_PumpEvents; | 96 device->PumpEvents = Android_PumpEvents; |
98 | 97 |
99 device->free = Android_DeleteDevice; | 98 device->free = Android_DeleteDevice; |
100 | 99 |
101 /* GL pointers */ | 100 /* GL pointers */ |
102 device->GL_LoadLibrary = Android_GL_LoadLibrary; | 101 device->GL_LoadLibrary = Android_GL_LoadLibrary; |
103 device->GL_GetProcAddress = Android_GL_GetProcAddress; | 102 device->GL_GetProcAddress = Android_GL_GetProcAddress; |
134 } | 133 } |
135 | 134 |
136 SDL_zero(mode); | 135 SDL_zero(mode); |
137 SDL_AddDisplayMode(&_this->displays[0], &mode); | 136 SDL_AddDisplayMode(&_this->displays[0], &mode); |
138 | 137 |
139 Android_InitEvents(); | 138 Android_InitKeyboard(); |
140 | 139 |
141 /* We're done! */ | 140 /* We're done! */ |
142 return 0; | |
143 } | |
144 | |
145 static int | |
146 Android_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode) | |
147 { | |
148 return 0; | 141 return 0; |
149 } | 142 } |
150 | 143 |
151 void | 144 void |
152 Android_VideoQuit(_THIS) | 145 Android_VideoQuit(_THIS) |
158 iScreenWidth = width; | 151 iScreenWidth = width; |
159 iScreenHeight = height; | 152 iScreenHeight = height; |
160 } | 153 } |
161 | 154 |
162 | 155 |
163 | |
164 /* vi: set ts=4 sw=4 expandtab: */ | 156 /* vi: set ts=4 sw=4 expandtab: */ |