mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +00:00
Merge pull request #376 from DavidWyand-GG/LinuxFixes
Changes to have Linux dedicated compiling again
This commit is contained in:
commit
281e9f87e4
|
|
@ -27,7 +27,7 @@
|
|||
#include "platform/platform.h"
|
||||
#endif
|
||||
#ifndef _EVENT_H_
|
||||
#include "platform/event.h"
|
||||
#include "platform/input/event.h"
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
#include <unistd.h>
|
||||
#include <signal.h>
|
||||
|
||||
#ifndef DEDICATED
|
||||
#ifndef TORQUE_DEDICATED
|
||||
#include <SDL/SDL.h>
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
//#include "platformX86UNIX/platformGL.h"
|
||||
#include "core/strings/stringFunctions.h"
|
||||
|
||||
#ifndef DEDICATED
|
||||
#ifndef TORQUE_DEDICATED
|
||||
#include <X11/Xlib.h> // 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;
|
||||
|
|
|
|||
|
|
@ -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; }
|
||||
|
|
|
|||
|
|
@ -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 <unistd.h> // fork, execvp, chdir
|
||||
#include <time.h> // nanosleep
|
||||
|
||||
#ifndef DEDICATED
|
||||
#ifndef TORQUE_DEDICATED
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xos.h>
|
||||
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue