From c5c08e72d2a0bc257e24e3c569066d1719395c84 Mon Sep 17 00:00:00 2001 From: DavidWyand-GG Date: Wed, 8 May 2013 06:55:51 +0000 Subject: [PATCH] Changes to have Linux dedicated compiling again --- .../source/platformX86UNIX/platformX86UNIX.h | 2 +- .../source/platformX86UNIX/x86UNIXConsole.cpp | 2 +- Engine/source/platformX86UNIX/x86UNIXMain.cpp | 2 +- .../platformX86UNIX/x86UNIXProcessControl.cpp | 2 +- Engine/source/platformX86UNIX/x86UNIXState.h | 6 ++-- .../platformX86UNIX/x86UNIXStub.dedicated.cpp | 2 +- .../platformX86UNIX/x86UNIXWindow.client.cpp | 34 +++++++++---------- 7 files changed, 25 insertions(+), 25 deletions(-) diff --git a/Engine/source/platformX86UNIX/platformX86UNIX.h b/Engine/source/platformX86UNIX/platformX86UNIX.h index 96a176a39..dc239c37d 100644 --- a/Engine/source/platformX86UNIX/platformX86UNIX.h +++ b/Engine/source/platformX86UNIX/platformX86UNIX.h @@ -27,7 +27,7 @@ #include "platform/platform.h" #endif #ifndef _EVENT_H_ -#include "platform/event.h" +#include "platform/input/event.h" #endif #include diff --git a/Engine/source/platformX86UNIX/x86UNIXConsole.cpp b/Engine/source/platformX86UNIX/x86UNIXConsole.cpp index 256b5ca5c..859b420fa 100644 --- a/Engine/source/platformX86UNIX/x86UNIXConsole.cpp +++ b/Engine/source/platformX86UNIX/x86UNIXConsole.cpp @@ -23,7 +23,7 @@ #include "platformX86UNIX/platformX86UNIX.h" #include "platformX86UNIX/x86UNIXStdConsole.h" #include "platformX86UNIX/x86UNIXUtils.h" -#include "platform/event.h" +#include "platform/input/event.h" #include "platform/platform.h" #include "core/util/rawData.h" #include "core/strings/stringFunctions.h" diff --git a/Engine/source/platformX86UNIX/x86UNIXMain.cpp b/Engine/source/platformX86UNIX/x86UNIXMain.cpp index 75228f21f..4ffb262c9 100644 --- a/Engine/source/platformX86UNIX/x86UNIXMain.cpp +++ b/Engine/source/platformX86UNIX/x86UNIXMain.cpp @@ -49,7 +49,7 @@ void Platform::init() //installRedBookDevices(); #if 0 -#ifndef DEDICATED +#ifndef TORQUE_DEDICATED // if we're not dedicated do more initialization if (!x86UNIXState->isDedicated()) { diff --git a/Engine/source/platformX86UNIX/x86UNIXProcessControl.cpp b/Engine/source/platformX86UNIX/x86UNIXProcessControl.cpp index db134ad61..1930af2b5 100644 --- a/Engine/source/platformX86UNIX/x86UNIXProcessControl.cpp +++ b/Engine/source/platformX86UNIX/x86UNIXProcessControl.cpp @@ -30,7 +30,7 @@ #include #include -#ifndef DEDICATED +#ifndef TORQUE_DEDICATED #include #endif diff --git a/Engine/source/platformX86UNIX/x86UNIXState.h b/Engine/source/platformX86UNIX/x86UNIXState.h index eb5920ce1..c39ea00cd 100644 --- a/Engine/source/platformX86UNIX/x86UNIXState.h +++ b/Engine/source/platformX86UNIX/x86UNIXState.h @@ -25,7 +25,7 @@ //#include "platformX86UNIX/platformGL.h" #include "core/strings/stringFunctions.h" -#ifndef DEDICATED +#ifndef TORQUE_DEDICATED #include // for Display, Window and other X mojo #else #define Display int @@ -225,7 +225,7 @@ class DisplayPtrManager private: Display* openDisplay() { -#ifndef DEDICATED +#ifndef TORQUE_DEDICATED mDisplay = XOpenDisplay(NULL); if (mDisplay != NULL) mOpenedDisplay = true; @@ -237,7 +237,7 @@ class DisplayPtrManager { if (mOpenedDisplay) { -#ifndef DEDICATED +#ifndef TORQUE_DEDICATED XCloseDisplay(mDisplay); mDisplay = NULL; mOpenedDisplay = false; diff --git a/Engine/source/platformX86UNIX/x86UNIXStub.dedicated.cpp b/Engine/source/platformX86UNIX/x86UNIXStub.dedicated.cpp index b13b72f3f..770fd0680 100644 --- a/Engine/source/platformX86UNIX/x86UNIXStub.dedicated.cpp +++ b/Engine/source/platformX86UNIX/x86UNIXStub.dedicated.cpp @@ -92,7 +92,7 @@ void Platform::openFolder(const char *path) { } void Platform::openFile(const char *path) { } // window -bool Platform::displaySplashWindow() { return false; } +bool Platform::displaySplashWindow(String path) { return false; } // font PlatformFont *createPlatformFont(const char *name, U32 size, U32 charset) { return NULL; } diff --git a/Engine/source/platformX86UNIX/x86UNIXWindow.client.cpp b/Engine/source/platformX86UNIX/x86UNIXWindow.client.cpp index 736a28ad8..aff4d82a2 100644 --- a/Engine/source/platformX86UNIX/x86UNIXWindow.client.cpp +++ b/Engine/source/platformX86UNIX/x86UNIXWindow.client.cpp @@ -40,7 +40,7 @@ #include "platformX86UNIX/x86UNIXOGLVideo.h" #include "platformX86UNIX/x86UNIXState.h" -#ifndef DEDICATED +#ifndef TORQUE_DEDICATED #include "platformX86UNIX/x86UNIXMessageBox.h" #include "platformX86UNIX/x86UNIXInputManager.h" #endif @@ -51,7 +51,7 @@ #include // fork, execvp, chdir #include // nanosleep -#ifndef DEDICATED +#ifndef TORQUE_DEDICATED #include #include @@ -69,7 +69,7 @@ LockFunc_t DisplayPtrManager::sgUnlockFunc = NULL; static U32 lastTimeTick; static MRandomLCG sgPlatRandom; -#ifndef DEDICATED +#ifndef TORQUE_DEDICATED extern void InstallRedBookDevices(); extern void PollRedbookDevices(); extern bool InitOpenGL(); @@ -149,7 +149,7 @@ static S32 ParseCommandLine(S32 argc, const char **argv, static void DetectWindowingSystem() { -#ifndef DEDICATED +#ifndef TORQUE_DEDICATED Display* dpy = XOpenDisplay(NULL); if (dpy != NULL) { @@ -166,7 +166,7 @@ static void InitWindow(const Point2I &initialSize, const char *name) x86UNIXState->setWindowName(name); } -#ifndef DEDICATED +#ifndef TORQUE_DEDICATED //------------------------------------------------------------------------------ static bool InitSDL() { @@ -376,7 +376,7 @@ static inline void Sleep(int secs, int nanoSecs) nanosleep(&sleeptime, NULL); } -#ifndef DEDICATED +#ifndef TORQUE_DEDICATED struct AlertWinState { bool fullScreen; @@ -436,7 +436,7 @@ static inline void AlertEnableVideo(AlertWinState& state) //------------------------------------------------------------------------------ void Platform::AlertOK(const char *windowTitle, const char *message) { -#ifndef DEDICATED +#ifndef TORQUE_DEDICATED if (x86UNIXState->isXWindowsRunning()) { AlertWinState state; @@ -461,7 +461,7 @@ void Platform::AlertOK(const char *windowTitle, const char *message) //------------------------------------------------------------------------------ bool Platform::AlertOKCancel(const char *windowTitle, const char *message) { -#ifndef DEDICATED +#ifndef TORQUE_DEDICATED if (x86UNIXState->isXWindowsRunning()) { AlertWinState state; @@ -489,7 +489,7 @@ bool Platform::AlertOKCancel(const char *windowTitle, const char *message) //------------------------------------------------------------------------------ bool Platform::AlertRetry(const char *windowTitle, const char *message) { -#ifndef DEDICATED +#ifndef TORQUE_DEDICATED if (x86UNIXState->isXWindowsRunning()) { AlertWinState state; @@ -524,7 +524,7 @@ bool Platform::excludeOtherInstances(const char *mutexName) //------------------------------------------------------------------------------ void Platform::enableKeyboardTranslation(void) { -#ifndef DEDICATED +#ifndef TORQUE_DEDICATED // JMQ: not sure if this is needed for i18n keyboards //SDL_EnableUNICODE( 1 ); // SDL_EnableKeyRepeat( @@ -536,7 +536,7 @@ void Platform::enableKeyboardTranslation(void) //------------------------------------------------------------------------------ void Platform::disableKeyboardTranslation(void) { -#ifndef DEDICATED +#ifndef TORQUE_DEDICATED //SDL_EnableUNICODE( 0 ); // SDL_EnableKeyRepeat(0, 0); #endif @@ -545,7 +545,7 @@ void Platform::disableKeyboardTranslation(void) //------------------------------------------------------------------------------ void Platform::setWindowLocked(bool locked) { -#ifndef DEDICATED +#ifndef TORQUE_DEDICATED x86UNIXState->setWindowLocked(locked); UInputManager* uInputManager = @@ -560,7 +560,7 @@ void Platform::setWindowLocked(bool locked) //------------------------------------------------------------------------------ void Platform::minimizeWindow() { -#ifndef DEDICATED +#ifndef TORQUE_DEDICATED if (x86UNIXState->windowCreated()) SDL_WM_IconifyWindow(); #endif @@ -574,7 +574,7 @@ void Platform::process() if (x86UNIXState->windowCreated()) { -#ifndef DEDICATED +#ifndef TORQUE_DEDICATED // process window events PROFILE_START(XUX_ProcessMessages); bool quit = !ProcessMessages(); @@ -622,7 +622,7 @@ void Platform::process() } } -#ifndef DEDICATED +#ifndef TORQUE_DEDICATED #if 0 // JMQ: disabled this because it may fire mistakenly in some configurations. // 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) { -#ifndef DEDICATED +#ifndef TORQUE_DEDICATED // initialize window InitWindow(initialSize, name); if (!InitOpenGL()) @@ -825,7 +825,7 @@ int main(S32 argc, const char **argv) void Platform::setWindowTitle( const char* title ) { -#ifndef DEDICATED +#ifndef TORQUE_DEDICATED x86UNIXState->setWindowName(title); SDL_WM_SetCaption(x86UNIXState->getWindowName(), NULL); #endif