comparison src/video/android/SDL_androidgl.c @ 4709:6dc26b9d8368

Tweaks to the libsdl side
author Paul Hunkin <paul@bieh.net>
date Fri, 18 Jun 2010 01:29:14 +1200
parents 8b109f0dcd2f
children aeac51289991
comparison
equal deleted inserted replaced
4708:f3f65cb6a382 4709:6dc26b9d8368
34 #include "SDL_androidevents.h" 34 #include "SDL_androidevents.h"
35 #include "SDL_androidrender.h" 35 #include "SDL_androidrender.h"
36 36
37 #include <android/log.h> 37 #include <android/log.h>
38 38
39 #include <pthread.h>
39 40
40 /* 41 /*
41 These things are in the JNI android support 42 These things are in the JNI android support
42 */ 43 */
43 44 extern pthread_mutex_t mSDLRenderMutex;
44 45 extern pthread_cond_t mSDLRenderCondition;
45 46
46 /* GL functions */ 47 /* GL functions */
47 int Android_GL_LoadLibrary(_THIS, const char *path){ 48 int Android_GL_LoadLibrary(_THIS, const char *path){
48 __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_LoadLibrary\n"); 49 __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_LoadLibrary\n");
49 return 0; 50 return 0;
65 } 66 }
66 */ 67 */
67 68
68 SDL_GLContext Android_GL_CreateContext(_THIS, SDL_Window * window){ 69 SDL_GLContext Android_GL_CreateContext(_THIS, SDL_Window * window){
69 __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_CreateContext\n"); 70 __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_CreateContext\n");
70 return NULL; 71 return 1;
71 } 72 }
72 73
73 int Android_GL_MakeCurrent(_THIS, SDL_Window * window, 74 int Android_GL_MakeCurrent(_THIS, SDL_Window * window,
74 SDL_GLContext context){ 75 SDL_GLContext context){
75 __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_MakeCurrent\n"); 76 __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_MakeCurrent\n");
85 __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_GetSwapInterval\n"); 86 __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_GetSwapInterval\n");
86 return 0; 87 return 0;
87 } 88 }
88 89
89 void Android_GL_SwapWindow(_THIS, SDL_Window * window){ 90 void Android_GL_SwapWindow(_THIS, SDL_Window * window){
90 __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_SwapWindow\n"); 91
92 pthread_mutex_lock(&mSDLRenderMutex);
93 pthread_cond_wait(&mSDLRenderCondition, &mSDLRenderMutex);
94 pthread_mutex_unlock(&mSDLRenderMutex);
95
96
97 //__android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_SwapWindow\n");
98
91 } 99 }
92 100
93 void Android_GL_DeleteContext(_THIS, SDL_GLContext context){ 101 void Android_GL_DeleteContext(_THIS, SDL_GLContext context){
94 __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_DeleteContext\n"); 102 __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_DeleteContext\n");
95 } 103 }