Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

[WIN32] get rid of SDL in XBMC #979

Merged
merged 1 commit into from

2 participants

@wsoltys
Collaborator

this pr depends on the WINJoystick pr so ignore the first commit.
The TexturePacker still uses SDL so SDL and SDL_image isn't removed from our build dependencies yet.

I'm unsure about the ifdefs in Powermanager.cpp and AdvancedSettings.cpp. Do we still depend on SDL for full screen or can we just remove that?

@wsoltys wsoltys was assigned
@wsoltys
Collaborator

@jmarshallnz , @davilla : Any comments about using HAS_SDL for indicating full screen capability?

@davilla
Collaborator

HAS_SDL will not be present on embedded and they can do full screen.

@wsoltys
Collaborator

So can we remove the ifdef around full screen completely? Powermanager.cpp and AdvancedSettings.cpp that is.

@wsoltys
Collaborator

btw I searched for code lines to determine endianness but found so many examples that I dunno which could be safely used. So I decided to use boost but I'm open for suggestions.

@wsoltys
Collaborator

That seems to work:
#define LITTLE_ENDIAN 0x41424344UL
#define BIG_ENDIAN 0x44434241UL
#define PDP_ENDIAN 0x42414443UL
#define ENDIAN_ORDER ('ABCD')

#if ENDIAN_ORDER==BIG_ENDIAN
:)

@wsoltys
Collaborator

I've kicked boost out and just disabled big endian on windows for now (unlikely that we need it soon).
I'll let the HAS_SDL ifdefs for full screen in because I dunno what happens if a user sets m_fullscreen to false via advancedsettings on embedded.
If no one objects I pull this in the next days.

@wsoltys
Collaborator

@davilla : maybe replacing the ifdef HAS_SDL by something like a target embedded might be more suitable? At least for all devices which doesn't support window mode if I read it right.

@wsoltys wsoltys merged commit 6f68bde into xbmc:master
@tru tru referenced this pull request from a commit in RasPlex/plex-home-theatre
@tru tru Make it possible to hide All Episodes in advancedsettings
We are reusing the advancedsetting <videolibrary><hideallitems>

Fixes #979
d7b9f18
@tru tru referenced this pull request from a commit in plexinc/plex-home-theater-public
@tru tru Make it possible to hide All Episodes in advancedsettings
We are reusing the advancedsetting <videolibrary><hideallitems>

Fixes #979
3ea68db
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
View
3  project/BuildDependencies/scripts/libsdl_d.bat
@@ -9,14 +9,11 @@ cd %TMP_PATH%
xcopy SDL-1.2.14\include\* "%CUR_PATH%\include\SDL\" /E /Q /I /Y
copy SDL-1.2.14\lib\SDL.lib "%CUR_PATH%\lib\SDL.lib" /Y
-copy SDL-1.2.14\lib\SDL.dll "%XBMC_PATH%\project\Win32BuildSetup\dependencies\SDL.dll"
copy SDL-1.2.14\lib\SDL.dll "%XBMC_PATH%\tools\TexturePacker\SDL.dll"
copy SDL_image-1.2.10\include\SDL_image.h "%CUR_PATH%\include\SDL\"
copy SDL_image-1.2.10\lib\*.dll "%XBMC_PATH%\tools\TexturePacker\"
copy SDL_image-1.2.10\lib\SDL_image.lib "%CUR_PATH%\lib\SDL_image.lib" /Y
-rem for debugging
-copy SDL-1.2.14\lib\SDL.dll "%XBMC_PATH%\project\VS2010Express\XBMC\Debug (DirectX)\" /Y
cd %LOC_PATH%
View
4 project/VS2010Express/XBMC.vcxproj
@@ -165,7 +165,7 @@
</ClCompile>
<Link>
<AdditionalOptions>/MACHINE:I386 /IGNORE:4089 /ignore:4254 %(AdditionalOptions)</AdditionalOptions>
- <AdditionalDependencies>SDL.lib;D3D9.lib;D3dx9.lib;DInput8.lib;DSound.lib;winmm.lib;ws2_32.lib;Mpr.lib;Iphlpapi.lib;PowrProf.lib;setupapi.lib;dwmapi.lib;strmiids.lib;dxguid.lib;mfuuid.lib;comctl32.lib;yajl.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>D3D9.lib;D3dx9.lib;DInput8.lib;DSound.lib;winmm.lib;ws2_32.lib;Mpr.lib;Iphlpapi.lib;PowrProf.lib;setupapi.lib;dwmapi.lib;strmiids.lib;dxguid.lib;mfuuid.lib;comctl32.lib;yajl.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)XBMC.exe</OutputFile>
<AdditionalLibraryDirectories>..\..\lib\libSDL-WIN32\lib;..\..\xbmc\cores\DSPlayer\Libs;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<IgnoreSpecificDefaultLibraries>libc;msvcrt;libcmt;msvcrtd;msvcprtd;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
@@ -214,7 +214,7 @@
</ClCompile>
<Link>
<AdditionalOptions>/MACHINE:I386 /IGNORE:4089 /ignore:4254 %(AdditionalOptions)</AdditionalOptions>
- <AdditionalDependencies>SDL.lib;D3D9.lib;D3dx9.lib;DInput8.lib;DSound.lib;winmm.lib;ws2_32.lib;Mpr.lib;Iphlpapi.lib;PowrProf.lib;setupapi.lib;dwmapi.lib;strmiids.lib;dxguid.lib;mfuuid.lib;comctl32.lib;yajl.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>D3D9.lib;D3dx9.lib;DInput8.lib;DSound.lib;winmm.lib;ws2_32.lib;Mpr.lib;Iphlpapi.lib;PowrProf.lib;setupapi.lib;dwmapi.lib;strmiids.lib;dxguid.lib;mfuuid.lib;comctl32.lib;yajl.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)XBMC.exe</OutputFile>
<AdditionalLibraryDirectories>..\..\lib\libSDL-WIN32\lib;..\..\xbmc\cores\DSPlayer\Libs;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<IgnoreSpecificDefaultLibraries>libc;msvcrt;libci;msvcprt;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
View
2  xbmc/powermanagement/PowerManager.cpp
@@ -206,7 +206,7 @@ void CPowerManager::OnWake()
// reset out timers
g_application.ResetShutdownTimers();
-#ifdef HAS_SDL
+#if defined(HAS_SDL) || defined(TARGET_WINDOWS)
if (g_Windowing.IsFullScreen())
{
#ifdef _WIN32
View
2  xbmc/settings/AdvancedSettings.cpp
@@ -712,7 +712,7 @@ void CAdvancedSettings::ParseSettingsFile(const CStdString &file)
XMLUtils::GetBoolean(pRootElement, "handlemounting", m_handleMounting);
-#ifdef HAS_SDL
+#if defined(HAS_SDL) || defined(TARGET_WINDOWS)
XMLUtils::GetBoolean(pRootElement, "fullscreen", m_startFullScreen);
#endif
XMLUtils::GetBoolean(pRootElement, "splash", m_splashImage);
View
1  xbmc/system.h
@@ -97,7 +97,6 @@
*****************/
#if defined(TARGET_WINDOWS)
-#define HAS_SDL
#define HAS_SDL_JOYSTICK
#define HAS_DVD_DRIVE
#define HAS_WIN32_NETWORK
View
9 xbmc/win32/PlatformDefs.h
@@ -53,10 +53,8 @@ typedef long __off_t;
#define popen _popen
#define pclose _pclose
-#ifdef HAS_SDL
-#include <SDL/SDL_endian.h>
-
-#if SDL_BYTEORDER == SDL_BIG_ENDIAN
+#if 0
+// big endian
#define PIXEL_ASHIFT 0
#define PIXEL_RSHIFT 8
#define PIXEL_GSHIFT 16
@@ -65,8 +63,8 @@ typedef long __off_t;
#define RMASK 0x0000ff00
#define GMASK 0x00ff0000
#define BMASK 0xff000000
-
#else
+// little endian
#define PIXEL_ASHIFT 24
#define PIXEL_RSHIFT 16
#define PIXEL_GSHIFT 8
@@ -76,7 +74,6 @@ typedef long __off_t;
#define GMASK 0x0000ff00
#define BMASK 0x000000ff
#endif
-#endif
#ifndef va_copy
#define va_copy(dst, src) ((dst) = (src))
View
1  xbmc/win32/pch.h
@@ -22,7 +22,6 @@
#include <d3d9types.h>
#endif
#include "boost/shared_ptr.hpp"
-#include "SDL\SDL.h"
// anything below here should be headers that very rarely (hopefully never)
// change yet are included almost everywhere.
#include "utils/StdString.h"
Something went wrong with that request. Please try again.