mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +00:00
Merge pull request #432 from Azaezel/alpha40/sdlwebGeneralization
sdl usage standards proposal 3
This commit is contained in:
commit
a0ba345095
|
|
@ -132,6 +132,7 @@ void Platform::outputDebugString( const char *string, ... )
|
|||
fflush(stderr);
|
||||
#endif
|
||||
}
|
||||
#ifndef TORQUE_SDL
|
||||
//-----------------------------------------------------------------------------
|
||||
bool Platform::openWebBrowser( const char* webAddress )
|
||||
{
|
||||
|
|
@ -142,7 +143,7 @@ bool Platform::openWebBrowser( const char* webAddress )
|
|||
|
||||
return(err==noErr);
|
||||
}
|
||||
|
||||
#endif
|
||||
#pragma mark ---- Administrator ----
|
||||
//-----------------------------------------------------------------------------
|
||||
bool Platform::getUserIsAdministrator()
|
||||
|
|
|
|||
30
Engine/source/platformSDL/sdlPlatform.cpp
Normal file
30
Engine/source/platformSDL/sdlPlatform.cpp
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2012 GarageGames, LLC
|
||||
//
|
||||
// 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, sublicense, and/or
|
||||
// sell copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// 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. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include "platform/platform.h"
|
||||
/// Spawn the User default web browser with a URL
|
||||
/// @param webAddress URL to pass to browser
|
||||
/// @return true if browser successfully spawned
|
||||
bool Platform::openWebBrowser(const char* webAddress)
|
||||
{
|
||||
return !SDL_OpenURL(webAddress);
|
||||
}
|
||||
|
|
@ -511,6 +511,7 @@ F32 Platform::getRandom()
|
|||
return sgPlatRandom.randF();
|
||||
}
|
||||
|
||||
#ifndef TORQUE_SDL
|
||||
////--------------------------------------
|
||||
/// Spawn the default Operating System web browser with a URL
|
||||
/// @param webAddress URL to pass to browser
|
||||
|
|
@ -585,6 +586,7 @@ bool Platform::openWebBrowser( const char* webAddress )
|
|||
|
||||
return( true );
|
||||
}
|
||||
#endif
|
||||
|
||||
//--------------------------------------
|
||||
// Login password routines:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include "platform/platform.h"
|
||||
|
||||
#ifndef TORQUE_SDL
|
||||
bool Platform::openWebBrowser(const char* webAddress)
|
||||
{
|
||||
String startingURL(webAddress);
|
||||
|
|
@ -23,7 +23,7 @@ bool Platform::openWebBrowser(const char* webAddress)
|
|||
|
||||
return false;
|
||||
}
|
||||
|
||||
#endif
|
||||
#ifdef TORQUE_DEDICATED
|
||||
// XA: New class for the unix unicode font
|
||||
class PlatformFont;
|
||||
|
|
|
|||
|
|
@ -197,3 +197,8 @@
|
|||
#else
|
||||
# define TORQUE_INSTANCE_EXCLUSION "TorqueTest"
|
||||
#endif
|
||||
|
||||
//use sdl backend?
|
||||
#if defined(TORQUE_SDL)
|
||||
#include <SDL.h>
|
||||
#endif
|
||||
Loading…
Reference in a new issue