mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-02 20:10:32 +00:00
sdl usage standards proposal 3:
again maintains fallbacks for folks that just don't want to use the lib (though if we do want to go that route, we'll likely want to re-review a few commits and put fallbacks, well, *back* at some point) includes sdl in torqueconfig.h if in use to kill duplication. adds a generic sdlPlatform.cpp for general methods, oneliners, and the like
This commit is contained in:
parent
1fbf46fa90
commit
254ac462b5
5 changed files with 41 additions and 3 deletions
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);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue