Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Tweaks to the libsdl side
Browse files Browse the repository at this point in the history
  • Loading branch information
bieh committed Jun 17, 2010
1 parent 3cb8539 commit 5c40435
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/video/android/SDL_androidgl.c
Expand Up @@ -36,12 +36,13 @@

#include <android/log.h>

#include <pthread.h>

/*
These things are in the JNI android support
*/

extern pthread_mutex_t mSDLRenderMutex;
extern pthread_cond_t mSDLRenderCondition;

/* GL functions */
int Android_GL_LoadLibrary(_THIS, const char *path){
Expand All @@ -67,7 +68,7 @@ int *Android_GL_GetVisual(_THIS, Display * display, int screen){

SDL_GLContext Android_GL_CreateContext(_THIS, SDL_Window * window){
__android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_CreateContext\n");
return NULL;
return 1;
}

int Android_GL_MakeCurrent(_THIS, SDL_Window * window,
Expand All @@ -87,7 +88,14 @@ int Android_GL_GetSwapInterval(_THIS){
}

void Android_GL_SwapWindow(_THIS, SDL_Window * window){
__android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_SwapWindow\n");

pthread_mutex_lock(&mSDLRenderMutex);
pthread_cond_wait(&mSDLRenderCondition, &mSDLRenderMutex);
pthread_mutex_unlock(&mSDLRenderMutex);


//__android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_SwapWindow\n");

}

void Android_GL_DeleteContext(_THIS, SDL_GLContext context){
Expand Down

0 comments on commit 5c40435

Please sign in to comment.