Skip to content

Commit

Permalink
UPBGE: Replace WITH_PYTHON_SECURITY by WITH_GAMEENGINE_SECURITY in La…
Browse files Browse the repository at this point in the history
…uncher/.

WITH_PYTHON_SECURITY was previously used to disable the python console and
the main loop override from blenderplayer. This was not the best way as
WITH_PYTHON_SECURITY is enabled by default. To fix this behaviour a specific
cmake option is added : WITH_GAMEENGINE_SECURITY.
  • Loading branch information
panzergame committed Jul 28, 2016
1 parent fdadae1 commit 5ea4c9b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,10 @@ option(WITH_BULLET "Enable Bullet (Physics Engine)" ON)
option(WITH_SYSTEM_BULLET "Use the systems bullet library (currently unsupported due to missing features in upstream!)" )
mark_as_advanced(WITH_SYSTEM_BULLET)
option(WITH_GAMEENGINE "Enable Game Engine" ${_init_GAMEENGINE})

option(WITH_GAMEENGINE_SECURITY "Disable game engine python debugging tools" OFF)
mark_as_advanced(WITH_GAMEENGINE_SECURITY)

if(APPLE)
set(WITH_GAMEENGINE_DECKLINK OFF)
else()
Expand Down
4 changes: 2 additions & 2 deletions source/gameengine/Launcher/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ set(SRC
LA_System.h
)

if(WITH_PYTHON_SECURITY)
add_definitions(-DWITH_PYTHON_SECURITY)
if(WITH_GAMEENGINE_SECURITY)
add_definitions(-DWITH_GAMEENGINE_SECURITY)
endif()

if(WITH_AUDASPACE)
Expand Down
2 changes: 1 addition & 1 deletion source/gameengine/Launcher/LA_Launcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ void LA_Launcher::ExitEngine()

void LA_Launcher::HandlePythonConsole()
{
#ifndef WITH_PYTHON_SECURITY
#ifndef WITH_GAMEENGINE_SECURITY
if (!m_pythonConsole.use) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion source/gameengine/Launcher/LA_PlayerLauncher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ void LA_PlayerLauncher::startFullScreen(

bool LA_PlayerLauncher::GetMainLoopPythonCode(char **pythonCode, char **pythonFileName)
{
#ifndef WITH_PYTHON_SECURITY
#ifndef WITH_GAMEENGINE_SECURITY
if (m_pythonMainLoop) {
if (BLI_is_file(m_pythonMainLoop)) {
size_t filesize = 0;
Expand Down

0 comments on commit 5ea4c9b

Please sign in to comment.