diff --git a/configure b/configure index b28dc182d..95a564f24 100755 --- a/configure +++ b/configure @@ -759,20 +759,6 @@ case $_host_os in DEFINES="$DEFINES -DBSPF_UNIX -DHAVE_GETTIMEOFDAY -DHAVE_INTTYPES" MODULES="$MODULES $SRC/unix" INCLUDES="$INCLUDES -I$SRC/unix" - - # - # Check for X11 - # - _x11=no - cat > $TMPC << EOF - #include - int main(void) { return 0; } -EOF - cc_check $LDFLAGS $CXXFLAGS -lX11 && _x11=yes - if test "$_x11" = yes ; then - DEFINES="$DEFINES -DHAVE_X11" - LIBS="$LIBS -lX11" - fi ;; win32) DEFINES="$DEFINES -DBSPF_WINDOWS -DHAVE_GETTIMEOFDAY -DHAVE_INTTYPES" @@ -781,7 +767,7 @@ EOF LIBS="$LIBS -lmingw32 -lwinmm" ;; *) - echo "WARNING: host system not currenty supported" + echo "WARNING: host system not currently supported" exit ;; esac diff --git a/src/emucore/FrameBuffer.cxx b/src/emucore/FrameBuffer.cxx index e3b3be4bd..352999a22 100644 --- a/src/emucore/FrameBuffer.cxx +++ b/src/emucore/FrameBuffer.cxx @@ -1091,6 +1091,8 @@ FrameBuffer::VideoMode FrameBuffer::getSavedVidMode() // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void FrameBuffer::centerAppWindow(const VideoMode& mode) { + // FIXSDL +#if 0 // Attempt to center the application window in non-fullscreen mode if(!fullScreen() && myOSystem->settings().getBool("center")) { @@ -1098,8 +1100,8 @@ void FrameBuffer::centerAppWindow(const VideoMode& mode) ((myOSystem->desktopWidth() - mode.screen_w) >> 1); int y = mode.screen_h >= myOSystem->desktopHeight() ? 0 : ((myOSystem->desktopHeight() - mode.screen_h) >> 1); - myOSystem->setAppWindowPos(x, y, mode.screen_w, mode.screen_h); } +#endif } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/emucore/OSystem.hxx b/src/emucore/OSystem.hxx index 282f64428..123da2bb2 100644 --- a/src/emucore/OSystem.hxx +++ b/src/emucore/OSystem.hxx @@ -512,14 +512,6 @@ class OSystem virtual string defaultSnapSaveDir() { return "~" BSPF_PATH_SEPARATOR; } virtual string defaultSnapLoadDir() { return "~" BSPF_PATH_SEPARATOR; } - /** - Set the position of the application window, generally using - platform-specific code. Note that this method is only ever - called for windowed mode, so no provisions need be made - for fullscreen mode. - */ - virtual void setAppWindowPos(int x, int y, int w, int h) { }; - protected: /** Query the OSystem video hardware for resolution information. diff --git a/src/gui/VideoDialog.cxx b/src/gui/VideoDialog.cxx index 7a06f8251..775fc1770 100644 --- a/src/gui/VideoDialog.cxx +++ b/src/gui/VideoDialog.cxx @@ -383,7 +383,7 @@ VideoDialog::VideoDialog(OSystem* osystem, DialogContainer* parent, myFullscreenCheckbox->clearFlags(WIDGET_ENABLED); myCenterCheckbox->clearFlags(WIDGET_ENABLED); #endif -#if !(defined(BSPF_WINDOWS) || (defined(BSPF_UNIX) && defined(HAVE_X11))) +#if !(defined(BSPF_WINDOWS) || defined(BSPF_UNIX)) myCenterCheckbox->clearFlags(WIDGET_ENABLED); #endif } diff --git a/src/unix/OSystemUNIX.cxx b/src/unix/OSystemUNIX.cxx index b11dfca42..5d53b16c4 100644 --- a/src/unix/OSystemUNIX.cxx +++ b/src/unix/OSystemUNIX.cxx @@ -17,13 +17,6 @@ // $Id$ //============================================================================ -#if defined(HAVE_X11) - #include - #include -#endif - -#include "bspf.hxx" -#include "OSystem.hxx" #include "OSystemUNIX.hxx" /** @@ -48,35 +41,3 @@ OSystemUNIX::OSystemUNIX() OSystemUNIX::~OSystemUNIX() { } - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -void OSystemUNIX::setAppWindowPos(int x, int y, int, int) -{ -#if defined(HAVE_X11) - // TODO: This functionality is deprecated, since the x/y fields - // of XSizeHints are obsolete. SDL2 will provide native methods - // for app centering (which is all this is currently used for). - - SDL_SysWMinfo sdl_info; - memset(&sdl_info, 0, sizeof(sdl_info)); - - SDL_VERSION (&sdl_info.version); - if(SDL_GetWMInfo(&sdl_info) > 0 && sdl_info.subsystem == SDL_SYSWM_X11) - { - Display* display = sdl_info.info.x11.display; - Window window = sdl_info.info.x11.wmwindow; - XSizeHints hints; - long supplied_return; - XGetWMNormalHints(display, window, &hints, &supplied_return); - - // Change X/Y position - hints.x = x; - hints.y = y; - XMoveWindow(display, window, hints.x, hints.y); - - // Flush the resize event so we don't catch it later - XSync(display, True); - XSetWMNormalHints(display, window, &hints); - } -#endif -} diff --git a/src/unix/OSystemUNIX.hxx b/src/unix/OSystemUNIX.hxx index 0afaf5a5e..f9c972916 100644 --- a/src/unix/OSystemUNIX.hxx +++ b/src/unix/OSystemUNIX.hxx @@ -20,7 +20,7 @@ #ifndef OSYSTEM_UNIX_HXX #define OSYSTEM_UNIX_HXX -#include "bspf.hxx" +#include "OSystem.hxx" /** This class defines UNIX-like OS's (Linux) system specific settings. @@ -40,13 +40,6 @@ class OSystemUNIX : public OSystem Destructor */ virtual ~OSystemUNIX(); - - public: - /** - Move X11 window to given position. Width and height are not - used (or modified). - */ - void setAppWindowPos(int x, int y, /* not used*/ int, int); }; #endif diff --git a/src/unix/stella.spec b/src/unix/stella.spec index 294046547..574017cc6 100644 --- a/src/unix/stella.spec +++ b/src/unix/stella.spec @@ -66,8 +66,7 @@ export CXXFLAGS=$RPM_OPT_FLAGS --enable-shared \ %endif --force-builtin-libpng --force-builtin-zlib \ - --docdir=%{_docdir}/stella \ - --x-libraries=%{_prefix}/X11R6/%{_lib} + --docdir=%{_docdir}/stella %make diff --git a/src/windows/OSystemWINDOWS.cxx b/src/windows/OSystemWINDOWS.cxx index d0c250680..03e9b1cd2 100644 --- a/src/windows/OSystemWINDOWS.cxx +++ b/src/windows/OSystemWINDOWS.cxx @@ -17,13 +17,12 @@ // $Id$ //============================================================================ -#include #include #include "bspf.hxx" #include "FSNode.hxx" #include "HomeFinder.hxx" -#include "OSystem.hxx" + #include "OSystemWINDOWS.hxx" /** @@ -103,26 +102,3 @@ string OSystemWINDOWS::defaultSnapLoadDir() { return defaultSnapSaveDir(); } - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -void OSystemWINDOWS::setAppWindowPos(int x, int y, int w, int h) -{ - SDL_SysWMinfo sdl_info; - memset(&sdl_info, 0, sizeof(sdl_info)); - SDL_VERSION (&sdl_info.version); - if(SDL_GetWMInfo(&sdl_info) <= 0) - return; - - // The following mostly comes from SDL_dx5video.c - HWND window = sdl_info.window; - RECT bounds; - - bounds.left = x; - bounds.top = y; - bounds.right = x + w; - bounds.bottom = y + h; - AdjustWindowRectEx(&bounds, GetWindowLong(window, GWL_STYLE), (GetMenu(window) != NULL), 0); - - SetWindowPos(window, HWND_NOTOPMOST, x, y, bounds.right-bounds.left, - bounds.bottom-bounds.top, SWP_NOCOPYBITS | SWP_SHOWWINDOW); -} diff --git a/src/windows/OSystemWINDOWS.hxx b/src/windows/OSystemWINDOWS.hxx index e253775e5..f1c7f7bd4 100644 --- a/src/windows/OSystemWINDOWS.hxx +++ b/src/windows/OSystemWINDOWS.hxx @@ -21,7 +21,6 @@ #define OSYSTEM_WINDOWS_HXX #include "OSystem.hxx" -#include "bspf.hxx" /** This class defines Windows system specific settings. @@ -48,13 +47,6 @@ class OSystemWINDOWS : public OSystem */ string defaultSnapSaveDir(); string defaultSnapLoadDir(); - - /** - Move window to given position. The width and height are also - required for the underlying function, but the window size itself - absolutely must not be changed. - */ - void setAppWindowPos(int x, int y, int w, int h); }; #endif