Thorough(!) remodeling of the arch/ directory and the contents therein; fixed link-time warnings on GCC and should make things a lot easier to manage. A pile of other random things too, mostly cleanups and getting things to work with the remodeled arch/ directory.
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
#include "LowLevelWindow.h"
|
||||
|
||||
#include "Selector_LowLevelWindow.h"
|
||||
|
||||
LowLevelWindow *MakeLowLevelWindow() { return new ARCH_LOW_LEVEL_WINDOW; }
|
||||
|
||||
/*
|
||||
* (c) 2002-2004 Glenn Maynard
|
||||
* All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, and/or sell copies of the Software, and to permit persons to
|
||||
* whom the Software is furnished to do so, provided that the above
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
* THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
|
||||
* INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
|
||||
* OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
||||
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
@@ -5,6 +5,7 @@
|
||||
* we use SDL. Note that not all SDL operations go here; however, nothing
|
||||
* outside of this can assume that SDL has VIDEO initialized. */
|
||||
|
||||
#include "global.h"
|
||||
#include "RageDisplay.h" // for RageDisplay::VideoModeParams
|
||||
|
||||
class LowLevelWindow
|
||||
@@ -25,6 +26,8 @@ public:
|
||||
virtual RageDisplay::VideoModeParams GetVideoModeParams() const = 0;
|
||||
};
|
||||
|
||||
LowLevelWindow *MakeLowLevelWindow();
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
@@ -17,7 +17,9 @@ public:
|
||||
|
||||
RageDisplay::VideoModeParams GetVideoModeParams() const { return CurrentParams; }
|
||||
};
|
||||
#undef ARCH_LOW_LEVEL_WINDOW
|
||||
#ifdef ARCH_LOW_LEVEL_WINDOW
|
||||
#error "More than one LowLevelWindow selected!"
|
||||
#endif
|
||||
#define ARCH_LOW_LEVEL_WINDOW LowLevelWindow_SDL
|
||||
|
||||
#endif
|
||||
|
||||
@@ -15,8 +15,9 @@ public:
|
||||
|
||||
RageDisplay::VideoModeParams GetVideoModeParams() const;
|
||||
};
|
||||
|
||||
#undef ARCH_LOW_LEVEL_WINDOW
|
||||
#ifdef ARCH_LOW_LEVEL_WINDOW
|
||||
#error "More than one LowLevelWindow selected!"
|
||||
#endif
|
||||
#define ARCH_LOW_LEVEL_WINDOW LowLevelWindow_Win32
|
||||
|
||||
#endif
|
||||
|
||||
@@ -97,7 +97,8 @@ CString LowLevelWindow_X11::TryVideoMode(RageDisplay::VideoModeParams p, bool &b
|
||||
// We're remodeling the existing window, and not touching the
|
||||
// context.
|
||||
bNewDeviceOut = false;
|
||||
// Remap the window to work around possible buggy WMs and/or X servers
|
||||
// Remap the window to work around possible buggy WMs and/or
|
||||
// X servers
|
||||
XUnmapWindow(X11Helper::Dpy(), X11Helper::Win() );
|
||||
}
|
||||
|
||||
|
||||
@@ -22,8 +22,9 @@ public:
|
||||
|
||||
RageDisplay::VideoModeParams GetVideoModeParams() const { return CurrentParams; }
|
||||
};
|
||||
// XXX: Shouldn't we try multiple LowLevelWindows and use whichever works?
|
||||
#undef ARCH_LOW_LEVEL_WINDOW
|
||||
#ifdef ARCH_LOW_LEVEL_WINDOW
|
||||
#error "More than one LowLevelWindow selected!"
|
||||
#endif
|
||||
#define ARCH_LOW_LEVEL_WINDOW LowLevelWindow_X11
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
#ifndef SELECTOR_LOW_LEVEL_WINDOW_H
|
||||
#define SELECTOR_LOW_LEVEL_WINDOW_H
|
||||
|
||||
/* LowLevelWindow selector. */
|
||||
#if defined(HAVE_WIN32)
|
||||
#include "LowLevelWindow_Win32.h"
|
||||
#elif defined(HAVE_X11) // Prefer LLW_X11 over LLW_SDL
|
||||
#include "LowLevelWindow_X11.h"
|
||||
#elif defined(HAVE_SDL)
|
||||
#include "LowLevelWindow_SDL.h"
|
||||
#else
|
||||
#error "No suitable LowLevelWindow available."
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* (c) 2005 Ben Anderson
|
||||
* All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, and/or sell copies of the Software, and to permit persons to
|
||||
* whom the Software is furnished to do so, provided that the above
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
* THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
|
||||
* INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
|
||||
* OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
||||
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
Reference in New Issue
Block a user