Page MenuHome

sdl_blenderplayer.patch

Authored By
Alex Fraser (z0r)
Nov 13 2013, 4:26 PM
Size
3 KB
Subscribers
None

sdl_blenderplayer.patch

diff --git a/blender/intern/ghost/intern/GHOST_DisplayManagerSDL.cpp b/blender/intern/ghost/intern/GHOST_DisplayManagerSDL.cpp
index 1b73329..4c67616 100644
--- a/blender/intern/ghost/intern/GHOST_DisplayManagerSDL.cpp
+++ b/blender/intern/ghost/intern/GHOST_DisplayManagerSDL.cpp
@@ -36,7 +36,7 @@ GHOST_DisplayManagerSDL::GHOST_DisplayManagerSDL(GHOST_SystemSDL *system)
}
GHOST_TSuccess
-GHOST_DisplayManagerSDL::getNumDisplays(GHOST_TUns8& numDisplays)
+GHOST_DisplayManagerSDL::getNumDisplays(GHOST_TUns8& numDisplays) const
{
numDisplays= SDL_GetNumVideoDisplays();
return GHOST_kSuccess;
@@ -44,7 +44,7 @@ GHOST_DisplayManagerSDL::getNumDisplays(GHOST_TUns8& numDisplays)
GHOST_TSuccess GHOST_DisplayManagerSDL::getNumDisplaySettings(GHOST_TUns8 display,
- GHOST_TInt32& numSettings)
+ GHOST_TInt32& numSettings) const
{
GHOST_ASSERT(display < 1, "Only single display systems are currently supported.\n");
numSettings= GHOST_TInt32(1);
@@ -54,7 +54,7 @@ GHOST_TSuccess GHOST_DisplayManagerSDL::getNumDisplaySettings(GHOST_TUns8 displa
GHOST_TSuccess
GHOST_DisplayManagerSDL::getDisplaySetting(GHOST_TUns8 display,
GHOST_TInt32 index,
- GHOST_DisplaySetting& setting)
+ GHOST_DisplaySetting& setting) const
{
GHOST_ASSERT(display < 1, "Only single display systems are currently supported.\n");
@@ -74,7 +74,7 @@ GHOST_DisplayManagerSDL::getDisplaySetting(GHOST_TUns8 display,
GHOST_TSuccess
GHOST_DisplayManagerSDL::getCurrentDisplaySetting(GHOST_TUns8 display,
- GHOST_DisplaySetting& setting)
+ GHOST_DisplaySetting& setting) const
{
return getDisplaySetting(display,GHOST_TInt32(0),setting);
}
diff --git a/blender/intern/ghost/intern/GHOST_DisplayManagerSDL.h b/blender/intern/ghost/intern/GHOST_DisplayManagerSDL.h
index ff8ab13..297a61f 100644
--- a/blender/intern/ghost/intern/GHOST_DisplayManagerSDL.h
+++ b/blender/intern/ghost/intern/GHOST_DisplayManagerSDL.h
@@ -46,20 +46,20 @@ public:
GHOST_DisplayManagerSDL(GHOST_SystemSDL *system);
GHOST_TSuccess
- getNumDisplays(GHOST_TUns8& numDisplays);
+ getNumDisplays(GHOST_TUns8& numDisplays) const;
GHOST_TSuccess
getNumDisplaySettings(GHOST_TUns8 display,
- GHOST_TInt32& numSettings);
+ GHOST_TInt32& numSettings) const;
GHOST_TSuccess
getDisplaySetting(GHOST_TUns8 display,
GHOST_TInt32 index,
- GHOST_DisplaySetting& setting);
+ GHOST_DisplaySetting& setting) const;
GHOST_TSuccess
getCurrentDisplaySetting(GHOST_TUns8 display,
- GHOST_DisplaySetting& setting);
+ GHOST_DisplaySetting& setting) const;
GHOST_TSuccess
setCurrentDisplaySetting(GHOST_TUns8 display,
diff --git a/blender/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp b/blender/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp
index 0547d97..29874e7 100644
--- a/blender/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp
+++ b/blender/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp
@@ -89,7 +89,7 @@ SCA_Joystick *SCA_Joystick::GetInstance( short int joyindex )
{
int i;
// do this once only
- if(SDL_InitSubSystem(SDL_INIT_JOYSTICK | SDL_INIT_VIDEO) == -1 ){
+ if(SDL_InitSubSystem(SDL_INIT_JOYSTICK) == -1 ){
echo("Error-Initializing-SDL: " << SDL_GetError());
return NULL;
}
@@ -124,7 +124,7 @@ void SCA_Joystick::ReleaseInstance()
m_instance[i]= NULL;
}
- SDL_QuitSubSystem(SDL_INIT_JOYSTICK | SDL_INIT_VIDEO);
+ SDL_QuitSubSystem(SDL_INIT_JOYSTICK);
#endif /* WITH_SDL */
}
}

File Metadata

Mime Type
text/x-diff
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
4b/63/a227a592c945dd4709fa0ac34efe

Event Timeline