Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
When I switch to the home screen and back to my app, this is my log output.
V/SDL ( 3377): onResume()
I/ActivityManager( 1396): Displayed activity org.libsdl.app/.SDLActivity: 478 ms (total 478 ms)
W/IInputConnectionWrapper( 1509): showStatusIcon on inactive InputConnection
V/SDL ( 3377): surfaceCreated()
V/SDL ( 3377): surfaceChanged()
V/SDL ( 3377): pixel format unknown -1
V/SDL ( 3377): Window size:480x270
I/SDL ( 3377): SDL_Android_Init()
I/SDL ( 3377): SDL_Android_Init() finished!
V/SDL ( 3377): Creating new EGL Surface
I/SDL ( 3377): [STUB] GL_SetSwapInterval
I/SDL ( 3377): [STUB] GL_GetSwapInterval
W/SDL/APP ( 3377): +++++ INIT DONE +++++
W/SDL/APP ( 3377): Unhandled event type=512
D/PhoneWindow( 3377): couldn't save which view has focus because the focused view org.libsdl.app.SDLSurface@44b215e8 has no id.
V/SDL ( 3377): onPause()
E/libEGL ( 3377): call to OpenGL ES API with no current context (logged once per thread)
W/SDL/APP ( 3377): Unhandled event type=512
W/SDL/APP ( 3377): Unhandled event type=512
W/SDL/APP ( 3377): Unhandled event type=512
I/ActivityManager( 1396): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10200000 cmp=com.lge.launcher/.Launcher }
I/WindowManager( 1396): Setting rotation to 0, animFlags=1
I/ActivityManager( 1396): Config changed: { scale=1.0 imsi=310/260 loc=en_US touch=3 keys=1/1/2 nav=1/1 orien=1 layout=18 uiMode=17 seq=81}
V/SDL ( 3377): surfaceDestroyed()
W/IInputConnectionWrapper( 3377): showStatusIcon on inactive InputConnection
W/InputManagerService( 1396): Starting input on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy@44ec6690 (uid=10087 pid=3377)
I/ActivityManager( 1396): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=org.libsdl.app/.SDLActivity bnds=[243,338][317,417] }
I/WindowManager( 1396): Setting rotation to 1, animFlags=1
I/ActivityManager( 1396): Config changed: { scale=1.0 imsi=310/260 loc=en_US touch=3 keys=1/1/2 nav=1/1 orien=2 layout=18 uiMode=17 seq=82}
V/SDL ( 3377): onResume()
D/[brighthy_log]( 1495): [BRIGHTHY] Enter ACTION_CONFIGURATION_CHANGED
W/SDL/APP ( 3377): Unhandled event type=512
W/SDL/APP ( 3377): Unhandled event type=512
W/SDL/APP ( 3377): Unhandled event type=512
E/Surface ( 3377): surface (id=1, identity=733) is invalid, err=-19 (No such device)
E/Surface ( 3377): surface (id=1, identity=733) is invalid, err=-19 (No such device)
E/Surface ( 3377): surface (id=1, identity=733) is invalid, err=-19 (No such device)
E/Surface ( 3377): surface (id=1, identity=733) is invalid, err=-19 (No such device)
E/Surface ( 3377): surface (id=1, identity=733) is invalid, err=-19 (No such device)
E/Adreno200-EGL( 3377): egliSwapWindowSurface: unable to dequeue native buffer
V/SDL ( 3377): surfaceCreated()
V/SDL ( 3377): Creating new EGL Surface
E/SDL ( 3377): Old EGL Context doesnt work, trying with a new one
E/Surface ( 3377): surface (id=1, identity=733) is invalid, err=-19 (No such device)
E/Adreno200-EGL( 3377): eglLockWindowSurface: unable to dequeue native buffer
E/Surface ( 3377): surface (id=1, identity=733) is invalid, err=-19 (No such device)
E/Adreno200-EGL( 3377): eglLockWindowSurface: unable to dequeue native buffer
E/Surface ( 3377): surface (id=1, identity=733) is invalid, err=-19 (No such device)
E/Adreno200-EGL( 3377): eglLockWindowSurface: unable to dequeue native buffer
E/Adreno200-EGL( 3377): egliSwapWindowSurface: oglSwapBuffer failed
E/Surface ( 3377): surface (id=1, identity=733) is invalid, err=-19 (No such device)
E/Adreno200-EGL( 3377): eglLockWindowSurface: unable to dequeue native buffer
E/Surface ( 3377): surface (id=1, identity=733) is invalid, err=-19 (No such device)
E/Adreno200-EGL( 3377): eglLockWindowSurface: unable to dequeue native buffer
E/Surface ( 3377): surface (id=1, identity=733) is invalid, err=-19 (No such device)
E/Adreno200-EGL( 3377): eglLockWindowSurface: unable to dequeue native buffer
E/Adreno200-EGL( 3377): egliSwapWindowSurface: oglSwapBuffer failed
E/Surface ( 3377): surface (id=1, identity=733) is invalid, err=-19 (No such device)
E/Adreno200-EGL( 3377): eglLockWindowSurface: unable to dequeue native buffer
E/Surface ( 3377): surface (id=1, identity=733) is invalid, err=-19 (No such device)
E/Adreno200-EGL( 3377): eglLockWindowSurface: unable to dequeue native buffer
E/Surface ( 3377): surface (id=1, identity=733) is invalid, err=-19 (No such device)
E/Adreno200-EGL( 3377): eglLockWindowSurface: unable to dequeue native buffer
E/Adreno200-EGL( 3377): egliSwapWindowSurface: oglSwapBuffer failed
E/Surface ( 3377): surface (id=1, identity=733) is invalid, err=-19 (No such device)
E/Adreno200-EGL( 3377): eglLockWindowSurface: unable to dequeue native buffer
E/Surface ( 3377): surface (id=1, identity=733) is invalid, err=-19 (No such device)
E/Adreno200-EGL( 3377): eglLockWindowSurface: unable to dequeue native buffer
V/SDL ( 3377): surfaceChanged()
V/SDL ( 3377): pixel format unknown -1
V/SDL ( 3377): Window size:480x270
E/Surface ( 3377): using an invalid surface id=1, identity=733 should be 736
E/Adreno200-EGL( 3377): eglLockWindowSurface: unable to dequeue native buffer
E/Surface ( 3377): using an invalid surface id=1, identity=733 should be 736
E/Adreno200-EGL( 3377): eglLockWindowSurface: unable to dequeue native buffer
E/Surface ( 3377): using an invalid surface id=1, identity=733 should be 736
E/Adreno200-EGL( 3377): eglLockWindowSurface: unable to dequeue native buffer
E/Surface ( 3377): using an invalid surface id=1, identity=733 should be 736
#include <SDL.h>
#include <lua.h>
#include <lualib.h>
#include <lauxlib.h>
#include <limits.h>
#include <string.h>
void sdl_derp(void) {
SDL_Init(SDL_INIT_EVERYTHING);
int w = 640;
int h = 480;
int done = 0, color = 0;
SDL_Window * window = SDL_CreateWindow("SDL 2.0 Demo", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, w, h, 0);
SDL_Renderer * renderer = SDL_CreateRenderer(window, -1, 0);
SDL_Log("+++++ INIT DONE +++++");
while (!done) {
SDL_Event event;
while (SDL_PollEvent(&event)!=0) {
if (event.type==SDL_QUIT) {
done = 1;
break;
} else {
SDL_Log("Unhandled event type=%d", event.type);
}
}
SDL_SetRenderDrawColor(renderer, 0xFF, color, color, 0xFF);
color = (color+1)&0xFF;
SDL_RenderClear(renderer);
SDL_RenderPresent(renderer);
SDL_Delay(20);
}
SDL_Log("+++++ FINISHED +++++");
SDL_Quit();
}
int SDL_main(int argc, char * argv[]) {
sdl_derp();
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment