Merge pull request #376 from DavidWyand-GG/LinuxFixes

Changes to have Linux dedicated compiling again
This commit is contained in:
David Wyand 2013-05-08 00:02:55 -07:00
commit 281e9f87e4
7 changed files with 25 additions and 25 deletions

View file

@ -27,7 +27,7 @@
#include "platform/platform.h" #include "platform/platform.h"
#endif #endif
#ifndef _EVENT_H_ #ifndef _EVENT_H_
#include "platform/event.h" #include "platform/input/event.h"
#endif #endif
#include <stdio.h> #include <stdio.h>

View file

@ -23,7 +23,7 @@
#include "platformX86UNIX/platformX86UNIX.h" #include "platformX86UNIX/platformX86UNIX.h"
#include "platformX86UNIX/x86UNIXStdConsole.h" #include "platformX86UNIX/x86UNIXStdConsole.h"
#include "platformX86UNIX/x86UNIXUtils.h" #include "platformX86UNIX/x86UNIXUtils.h"
#include "platform/event.h" #include "platform/input/event.h"
#include "platform/platform.h" #include "platform/platform.h"
#include "core/util/rawData.h" #include "core/util/rawData.h"
#include "core/strings/stringFunctions.h" #include "core/strings/stringFunctions.h"

View file

@ -49,7 +49,7 @@ void Platform::init()
//installRedBookDevices(); //installRedBookDevices();
#if 0 #if 0
#ifndef DEDICATED #ifndef TORQUE_DEDICATED
// if we're not dedicated do more initialization // if we're not dedicated do more initialization
if (!x86UNIXState->isDedicated()) if (!x86UNIXState->isDedicated())
{ {

View file

@ -30,7 +30,7 @@
#include <unistd.h> #include <unistd.h>
#include <signal.h> #include <signal.h>
#ifndef DEDICATED #ifndef TORQUE_DEDICATED
#include <SDL/SDL.h> #include <SDL/SDL.h>
#endif #endif

View file

@ -25,7 +25,7 @@
//#include "platformX86UNIX/platformGL.h" //#include "platformX86UNIX/platformGL.h"
#include "core/strings/stringFunctions.h" #include "core/strings/stringFunctions.h"
#ifndef DEDICATED #ifndef TORQUE_DEDICATED
#include <X11/Xlib.h> // for Display, Window and other X mojo #include <X11/Xlib.h> // for Display, Window and other X mojo
#else #else
#define Display int #define Display int
@ -225,7 +225,7 @@ class DisplayPtrManager
private: private:
Display* openDisplay() Display* openDisplay()
{ {
#ifndef DEDICATED #ifndef TORQUE_DEDICATED
mDisplay = XOpenDisplay(NULL); mDisplay = XOpenDisplay(NULL);
if (mDisplay != NULL) if (mDisplay != NULL)
mOpenedDisplay = true; mOpenedDisplay = true;
@ -237,7 +237,7 @@ class DisplayPtrManager
{ {
if (mOpenedDisplay) if (mOpenedDisplay)
{ {
#ifndef DEDICATED #ifndef TORQUE_DEDICATED
XCloseDisplay(mDisplay); XCloseDisplay(mDisplay);
mDisplay = NULL; mDisplay = NULL;
mOpenedDisplay = false; mOpenedDisplay = false;

View file

@ -92,7 +92,7 @@ void Platform::openFolder(const char *path) { }
void Platform::openFile(const char *path) { } void Platform::openFile(const char *path) { }
// window // window
bool Platform::displaySplashWindow() { return false; } bool Platform::displaySplashWindow(String path) { return false; }
// font // font
PlatformFont *createPlatformFont(const char *name, U32 size, U32 charset) { return NULL; } PlatformFont *createPlatformFont(const char *name, U32 size, U32 charset) { return NULL; }

View file

@ -40,7 +40,7 @@
#include "platformX86UNIX/x86UNIXOGLVideo.h" #include "platformX86UNIX/x86UNIXOGLVideo.h"
#include "platformX86UNIX/x86UNIXState.h" #include "platformX86UNIX/x86UNIXState.h"
#ifndef DEDICATED #ifndef TORQUE_DEDICATED
#include "platformX86UNIX/x86UNIXMessageBox.h" #include "platformX86UNIX/x86UNIXMessageBox.h"
#include "platformX86UNIX/x86UNIXInputManager.h" #include "platformX86UNIX/x86UNIXInputManager.h"
#endif #endif
@ -51,7 +51,7 @@
#include <unistd.h> // fork, execvp, chdir #include <unistd.h> // fork, execvp, chdir
#include <time.h> // nanosleep #include <time.h> // nanosleep
#ifndef DEDICATED #ifndef TORQUE_DEDICATED
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <X11/Xos.h> #include <X11/Xos.h>
@ -69,7 +69,7 @@ LockFunc_t DisplayPtrManager::sgUnlockFunc = NULL;
static U32 lastTimeTick; static U32 lastTimeTick;
static MRandomLCG sgPlatRandom; static MRandomLCG sgPlatRandom;
#ifndef DEDICATED #ifndef TORQUE_DEDICATED
extern void InstallRedBookDevices(); extern void InstallRedBookDevices();
extern void PollRedbookDevices(); extern void PollRedbookDevices();
extern bool InitOpenGL(); extern bool InitOpenGL();
@ -149,7 +149,7 @@ static S32 ParseCommandLine(S32 argc, const char **argv,
static void DetectWindowingSystem() static void DetectWindowingSystem()
{ {
#ifndef DEDICATED #ifndef TORQUE_DEDICATED
Display* dpy = XOpenDisplay(NULL); Display* dpy = XOpenDisplay(NULL);
if (dpy != NULL) if (dpy != NULL)
{ {
@ -166,7 +166,7 @@ static void InitWindow(const Point2I &initialSize, const char *name)
x86UNIXState->setWindowName(name); x86UNIXState->setWindowName(name);
} }
#ifndef DEDICATED #ifndef TORQUE_DEDICATED
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
static bool InitSDL() static bool InitSDL()
{ {
@ -376,7 +376,7 @@ static inline void Sleep(int secs, int nanoSecs)
nanosleep(&sleeptime, NULL); nanosleep(&sleeptime, NULL);
} }
#ifndef DEDICATED #ifndef TORQUE_DEDICATED
struct AlertWinState struct AlertWinState
{ {
bool fullScreen; bool fullScreen;
@ -436,7 +436,7 @@ static inline void AlertEnableVideo(AlertWinState& state)
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void Platform::AlertOK(const char *windowTitle, const char *message) void Platform::AlertOK(const char *windowTitle, const char *message)
{ {
#ifndef DEDICATED #ifndef TORQUE_DEDICATED
if (x86UNIXState->isXWindowsRunning()) if (x86UNIXState->isXWindowsRunning())
{ {
AlertWinState state; AlertWinState state;
@ -461,7 +461,7 @@ void Platform::AlertOK(const char *windowTitle, const char *message)
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
bool Platform::AlertOKCancel(const char *windowTitle, const char *message) bool Platform::AlertOKCancel(const char *windowTitle, const char *message)
{ {
#ifndef DEDICATED #ifndef TORQUE_DEDICATED
if (x86UNIXState->isXWindowsRunning()) if (x86UNIXState->isXWindowsRunning())
{ {
AlertWinState state; AlertWinState state;
@ -489,7 +489,7 @@ bool Platform::AlertOKCancel(const char *windowTitle, const char *message)
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
bool Platform::AlertRetry(const char *windowTitle, const char *message) bool Platform::AlertRetry(const char *windowTitle, const char *message)
{ {
#ifndef DEDICATED #ifndef TORQUE_DEDICATED
if (x86UNIXState->isXWindowsRunning()) if (x86UNIXState->isXWindowsRunning())
{ {
AlertWinState state; AlertWinState state;
@ -524,7 +524,7 @@ bool Platform::excludeOtherInstances(const char *mutexName)
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void Platform::enableKeyboardTranslation(void) void Platform::enableKeyboardTranslation(void)
{ {
#ifndef DEDICATED #ifndef TORQUE_DEDICATED
// JMQ: not sure if this is needed for i18n keyboards // JMQ: not sure if this is needed for i18n keyboards
//SDL_EnableUNICODE( 1 ); //SDL_EnableUNICODE( 1 );
// SDL_EnableKeyRepeat( // SDL_EnableKeyRepeat(
@ -536,7 +536,7 @@ void Platform::enableKeyboardTranslation(void)
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void Platform::disableKeyboardTranslation(void) void Platform::disableKeyboardTranslation(void)
{ {
#ifndef DEDICATED #ifndef TORQUE_DEDICATED
//SDL_EnableUNICODE( 0 ); //SDL_EnableUNICODE( 0 );
// SDL_EnableKeyRepeat(0, 0); // SDL_EnableKeyRepeat(0, 0);
#endif #endif
@ -545,7 +545,7 @@ void Platform::disableKeyboardTranslation(void)
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void Platform::setWindowLocked(bool locked) void Platform::setWindowLocked(bool locked)
{ {
#ifndef DEDICATED #ifndef TORQUE_DEDICATED
x86UNIXState->setWindowLocked(locked); x86UNIXState->setWindowLocked(locked);
UInputManager* uInputManager = UInputManager* uInputManager =
@ -560,7 +560,7 @@ void Platform::setWindowLocked(bool locked)
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void Platform::minimizeWindow() void Platform::minimizeWindow()
{ {
#ifndef DEDICATED #ifndef TORQUE_DEDICATED
if (x86UNIXState->windowCreated()) if (x86UNIXState->windowCreated())
SDL_WM_IconifyWindow(); SDL_WM_IconifyWindow();
#endif #endif
@ -574,7 +574,7 @@ void Platform::process()
if (x86UNIXState->windowCreated()) if (x86UNIXState->windowCreated())
{ {
#ifndef DEDICATED #ifndef TORQUE_DEDICATED
// process window events // process window events
PROFILE_START(XUX_ProcessMessages); PROFILE_START(XUX_ProcessMessages);
bool quit = !ProcessMessages(); bool quit = !ProcessMessages();
@ -622,7 +622,7 @@ void Platform::process()
} }
} }
#ifndef DEDICATED #ifndef TORQUE_DEDICATED
#if 0 #if 0
// JMQ: disabled this because it may fire mistakenly in some configurations. // JMQ: disabled this because it may fire mistakenly in some configurations.
// sdl's default event handling scheme should be enough. // sdl's default event handling scheme should be enough.
@ -665,7 +665,7 @@ void Platform::setWindowSize( U32 newWidth, U32 newHeight )
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void Platform::initWindow(const Point2I &initialSize, const char *name) void Platform::initWindow(const Point2I &initialSize, const char *name)
{ {
#ifndef DEDICATED #ifndef TORQUE_DEDICATED
// initialize window // initialize window
InitWindow(initialSize, name); InitWindow(initialSize, name);
if (!InitOpenGL()) if (!InitOpenGL())
@ -825,7 +825,7 @@ int main(S32 argc, const char **argv)
void Platform::setWindowTitle( const char* title ) void Platform::setWindowTitle( const char* title )
{ {
#ifndef DEDICATED #ifndef TORQUE_DEDICATED
x86UNIXState->setWindowName(title); x86UNIXState->setWindowName(title);
SDL_WM_SetCaption(x86UNIXState->getWindowName(), NULL); SDL_WM_SetCaption(x86UNIXState->getWindowName(), NULL);
#endif #endif