Fixed no video output in SDL 1.3, it seems that there are no more critical bugs in it.
This commit is contained in:
@@ -20,7 +20,7 @@ AppNeedsTwoButtonMouse=y
|
||||
ShowMouseCursor=n
|
||||
ForceRelativeMouseMode=n
|
||||
AppNeedsArrowKeys=n
|
||||
AppNeedsTextInput=n
|
||||
AppNeedsTextInput=y
|
||||
AppUsesJoystick=n
|
||||
AppHandlesJoystickSensitivity=n
|
||||
AppUsesMultitouch=y
|
||||
|
||||
@@ -136,6 +136,9 @@ main(int argc, char *argv[])
|
||||
if (SDL_CreateWindowAndRenderer(WINDOW_WIDTH, WINDOW_HEIGHT, 0, &window, &renderer) < 0) {
|
||||
quit(2);
|
||||
}
|
||||
SDL_RendererInfo info;
|
||||
SDL_GetRendererInfo(renderer, &info);
|
||||
fprintf(stderr, "Renderer: %s flags %d max texture %dx%d\n", info.name, info.flags, info.max_texture_width, info.max_texture_height);
|
||||
|
||||
if (LoadSprite("icon.bmp", renderer) < 0) {
|
||||
quit(2);
|
||||
@@ -166,7 +169,7 @@ main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
MoveSprites(window, renderer, sprite);
|
||||
fprintf(stderr, "Frame rendered, you see nothing on screen, that's bug in SDL, lalala\n");
|
||||
//fprintf(stderr, "Frame rendered, you see nothing on screen, that's bug in SDL, lalala\n");
|
||||
}
|
||||
|
||||
quit(0);
|
||||
|
||||
@@ -67,6 +67,8 @@ static void ANDROID_PumpEvents(_THIS);
|
||||
static int ANDROID_CreateWindow(_THIS, SDL_Window * window);
|
||||
static void ANDROID_DestroyWindow(_THIS, SDL_Window * window);
|
||||
|
||||
static void ANDROID_StartTextInput(_THIS);
|
||||
|
||||
void * glLibraryHandle = NULL;
|
||||
void * gl2LibraryHandle = NULL;
|
||||
|
||||
@@ -119,6 +121,8 @@ static SDL_VideoDevice *ANDROID_CreateDevice(int devindex)
|
||||
device->CreateWindow = ANDROID_CreateWindow;
|
||||
device->DestroyWindow = ANDROID_DestroyWindow;
|
||||
|
||||
device->StartTextInput = ANDROID_StartTextInput;
|
||||
|
||||
device->free = ANDROID_DeleteDevice;
|
||||
|
||||
glLibraryHandle = dlopen("libGLESv1_CM.so", RTLD_NOW | RTLD_GLOBAL);
|
||||
@@ -245,8 +249,9 @@ int ANDROID_CreateWindow(_THIS, SDL_Window * window)
|
||||
|
||||
window->flags &= ~SDL_WINDOW_RESIZABLE; /* window is NEVER resizeable */
|
||||
window->flags |= SDL_WINDOW_FULLSCREEN; /* window is always fullscreen */
|
||||
window->flags &= ~SDL_WINDOW_HIDDEN;
|
||||
window->flags |= SDL_WINDOW_SHOWN; /* only one window on Android */
|
||||
window->flags |= SDL_WINDOW_INPUT_FOCUS; /* always has input focus */
|
||||
window->flags |= SDL_WINDOW_INPUT_FOCUS; /* always has input focus */
|
||||
|
||||
__android_log_print(ANDROID_LOG_INFO, "libSDL", "ANDROID_CreateWindow(): ANDROID_CurrentWindow %p", ANDROID_CurrentWindow);
|
||||
|
||||
@@ -257,6 +262,12 @@ void ANDROID_DestroyWindow(_THIS, SDL_Window * window)
|
||||
ANDROID_CurrentWindow = NULL;
|
||||
};
|
||||
|
||||
void ANDROID_StartTextInput(_THIS)
|
||||
{
|
||||
SDL_ANDROID_ToggleScreenKeyboardTextInput("");
|
||||
}
|
||||
|
||||
|
||||
static void* ANDROID_GL_GetProcAddress(_THIS, const char *proc)
|
||||
{
|
||||
void * func = dlsym(glLibraryHandle, proc);
|
||||
|
||||
Reference in New Issue
Block a user