From dc49a995d69758a4770ee942edd22b52eb3d8a59 Mon Sep 17 00:00:00 2001 From: "gregory.hainaut@gmail.com" Date: Sun, 5 Sep 2010 22:08:55 +0000 Subject: [PATCH] GregMiscellaneous: zzogl: Fix fullscreen setting & remove useless library Major issue left: widescreen. git-svn-id: http://pcsx2.googlecode.com/svn/branches/GregMiscellaneous@3734 96395faa-99c1-11dd-bbfe-3dabce05a288 --- cmake/SearchForStuff.cmake | 3 --- plugins/zzogl-pg/opengl/CMakeLists.txt | 3 --- plugins/zzogl-pg/opengl/GLWinX11.cpp | 9 ++++++--- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/cmake/SearchForStuff.cmake b/cmake/SearchForStuff.cmake index e40a6a10fa..83011359c7 100644 --- a/cmake/SearchForStuff.cmake +++ b/cmake/SearchForStuff.cmake @@ -23,9 +23,6 @@ if(Linux) endif(GTK2_FOUND) find_package(X11) - # Manually find Xxf86vm because it is not done in the module... - FIND_LIBRARY(X11_Xxf86vm_LIB Xxf86vm ${X11_LIB_SEARCH_PATH}) - MARK_AS_ADVANCED(X11_Xxf86vm_LIB) endif(Linux) ## Use cmake package to find module diff --git a/plugins/zzogl-pg/opengl/CMakeLists.txt b/plugins/zzogl-pg/opengl/CMakeLists.txt index 3e08f0c627..872dd6c8db 100644 --- a/plugins/zzogl-pg/opengl/CMakeLists.txt +++ b/plugins/zzogl-pg/opengl/CMakeLists.txt @@ -155,9 +155,6 @@ target_link_libraries(${Output} ${OPENGL_LIBRARIES}) # link target with X11 target_link_libraries(${Output} ${X11_LIBRARIES}) -# link target with X11 videomod -target_link_libraries(${Output} ${X11_Xxf86vm_LIB}) - # User flags options if(NOT USER_CMAKE_LD_FLAGS STREQUAL "") target_link_libraries(${Output} "${USER_CMAKE_LD_FLAGS}") diff --git a/plugins/zzogl-pg/opengl/GLWinX11.cpp b/plugins/zzogl-pg/opengl/GLWinX11.cpp index 9650329ee9..a762d4200b 100644 --- a/plugins/zzogl-pg/opengl/GLWinX11.cpp +++ b/plugins/zzogl-pg/opengl/GLWinX11.cpp @@ -179,8 +179,10 @@ void GLWindow::ToggleFullscreen() XLockDisplay(glDisplay); if (!XSendEvent(glDisplay, RootWindow(glDisplay, vi->screen), False, mask, (XEvent*)(&cme))) ZZLog::Error_Log("Failed to send event: toggle fullscreen"); - else + else { fullScreen = (!fullScreen); + conf.setFullscreen(fullScreen); + } XUnlockDisplay(glDisplay); // Apply the change @@ -204,7 +206,6 @@ bool GLWindow::DisplayWindow(int _width, int _height) x = conf.x; y = conf.y; - fullScreen = (conf.fullscreen()); if (!CreateVisual()) return false; @@ -247,7 +248,9 @@ bool GLWindow::DisplayWindow(int _width, int _height) else ZZLog::Error_Log("No Direct Rendering possible!"); - if (fullScreen) { + // init fullscreen to 0. ToggleFullscreen will update it + fullScreen = 0; + if (conf.fullscreen()) { ToggleFullscreen(); } else { // Restore the window position