SDL events do not disabled on quit
This commit is contained in:
parent
fc629be57a
commit
7c77c97b4b
|
@ -257,8 +257,9 @@ void display_quit(void)
|
||||||
SDL_DestroyWindow(window);
|
SDL_DestroyWindow(window);
|
||||||
window = NULL;
|
window = NULL;
|
||||||
// do not call SDL_Quit() since there is another plugin that use
|
// do not call SDL_Quit() since there is another plugin that use
|
||||||
// SDL inside Audacious
|
// SDL inside Audacious.
|
||||||
SDL_QuitSubSystem(SDL_INIT_EVENTS);
|
// Do not call neither SDL_QuitSubsystem() just in case
|
||||||
|
//SDL_QuitSubSystem(SDL_INIT_EVENTS);
|
||||||
initialized = FALSE;
|
initialized = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -159,26 +159,23 @@ void infinity_render_multi_pcm(const float *data, int channels)
|
||||||
static void handle_window_event(SDL_Event *event) {
|
static void handle_window_event(SDL_Event *event) {
|
||||||
switch (event->window.event) {
|
switch (event->window.event) {
|
||||||
case SDL_WINDOWEVENT_SHOWN:
|
case SDL_WINDOWEVENT_SHOWN:
|
||||||
SDL_Log("Window %d shown", event->window.windowID);
|
//SDL_Log("Window %d shown", event->window.windowID);
|
||||||
visible = TRUE;
|
visible = TRUE;
|
||||||
break;
|
break;
|
||||||
case SDL_WINDOWEVENT_EXPOSED:
|
case SDL_WINDOWEVENT_EXPOSED:
|
||||||
SDL_Log("Window %d exposed", event->window.windowID);
|
//SDL_Log("Window %d exposed", event->window.windowID);
|
||||||
visible = TRUE;
|
visible = TRUE;
|
||||||
break;
|
break;
|
||||||
case SDL_WINDOWEVENT_HIDDEN:
|
case SDL_WINDOWEVENT_HIDDEN:
|
||||||
SDL_Log("Window %d hidden", event->window.windowID);
|
//SDL_Log("Window %d hidden", event->window.windowID);
|
||||||
visible = FALSE;
|
visible = FALSE;
|
||||||
break;
|
break;
|
||||||
case SDL_WINDOWEVENT_MOVED:
|
/*case SDL_WINDOWEVENT_MOVED:
|
||||||
SDL_Log("Window %d moved to %d,%d",
|
SDL_Log("Window %d moved to %d,%d",
|
||||||
event->window.windowID, event->window.data1,
|
event->window.windowID, event->window.data1,
|
||||||
event->window.data2);
|
event->window.data2);
|
||||||
break;
|
break;*/
|
||||||
case SDL_WINDOWEVENT_RESIZED:
|
case SDL_WINDOWEVENT_RESIZED:
|
||||||
SDL_Log("Window %d resized to %dx%d",
|
|
||||||
event->window.windowID, event->window.data1,
|
|
||||||
event->window.data2);
|
|
||||||
G_LOCK(resizing);
|
G_LOCK(resizing);
|
||||||
resizing = TRUE;
|
resizing = TRUE;
|
||||||
G_UNLOCK(resizing);
|
G_UNLOCK(resizing);
|
||||||
|
@ -187,21 +184,21 @@ static void handle_window_event(SDL_Event *event) {
|
||||||
g_message("Infinity: Screen resized to %dx%d pixels^2", width, height);
|
g_message("Infinity: Screen resized to %dx%d pixels^2", width, height);
|
||||||
must_resize = TRUE;
|
must_resize = TRUE;
|
||||||
break;
|
break;
|
||||||
case SDL_WINDOWEVENT_SIZE_CHANGED:
|
/*case SDL_WINDOWEVENT_SIZE_CHANGED:
|
||||||
SDL_Log("Window %d size changed to %dx%d",
|
SDL_Log("Window %d size changed to %dx%d",
|
||||||
event->window.windowID, event->window.data1,
|
event->window.windowID, event->window.data1,
|
||||||
event->window.data2);
|
event->window.data2);
|
||||||
break;
|
break;*/
|
||||||
case SDL_WINDOWEVENT_MINIMIZED:
|
case SDL_WINDOWEVENT_MINIMIZED:
|
||||||
SDL_Log("Window %d minimized", event->window.windowID);
|
//SDL_Log("Window %d minimized", event->window.windowID);
|
||||||
visible = FALSE;
|
visible = FALSE;
|
||||||
break;
|
break;
|
||||||
case SDL_WINDOWEVENT_MAXIMIZED:
|
/*case SDL_WINDOWEVENT_MAXIMIZED:
|
||||||
SDL_Log("Window %d maximized", event->window.windowID);
|
SDL_Log("Window %d maximized", event->window.windowID);
|
||||||
break;
|
break;
|
||||||
case SDL_WINDOWEVENT_RESTORED:
|
case SDL_WINDOWEVENT_RESTORED:
|
||||||
SDL_Log("Window %d restored", event->window.windowID);
|
SDL_Log("Window %d restored", event->window.windowID);
|
||||||
break;
|
break;*/
|
||||||
case SDL_WINDOWEVENT_CLOSE:
|
case SDL_WINDOWEVENT_CLOSE:
|
||||||
SDL_Log("Window %d closed", event->window.windowID);
|
SDL_Log("Window %d closed", event->window.windowID);
|
||||||
player->disable_plugin();
|
player->disable_plugin();
|
||||||
|
|
Loading…
Reference in New Issue