Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dropsdl #1175

Closed
wants to merge 25 commits into from
Closed

Dropsdl #1175

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
5b6caeb
X11: factor out code that reset device after lost
Jul 14, 2012
25decc3
X11: replace SDL window and event handling with native xlib
Jul 17, 2012
886280b
X11: simplify set and reset of locale
Jul 18, 2012
0a51b45
X11: Add xbmc icon
FernetMenta Jul 5, 2012
d33967f
X11: XWMHints must be allocated by XAllocVMHints since it can be exte…
Jul 19, 2012
9aef2c8
X11: add SDL joystick until we have a better solution
FernetMenta May 20, 2012
18311d8
X11: move handling of xrandr events
Jul 15, 2012
0b80d65
X11: support multiple xrandr displays
Jul 15, 2012
c7c6cb2
X11: support multiple xserver screens
Jul 15, 2012
fd0e37a
X11: support rotated screens.
Jul 8, 2012
bfef61d
X11: re-evaluate vsync method after having modified window
Jul 14, 2012
a9f2e95
add missing keys to xbmc keytable
FernetMenta Jun 9, 2012
4988dbd
[win32] move m_nScreen windowing variable to only system using it.
Jul 14, 2012
b87b5ff
x11: refactor WinEventsX11 to be a singleton class
Jul 18, 2012
5dee1c7
X11 (squash): don't resize window after (full)screen switch if we hav…
Jul 19, 2012
daa9d27
X11: use override_redirect if window manager doesn't support full scr…
Jul 19, 2012
937edd9
X11: make sure we set resolution before we create window
Sep 16, 2012
99e7201
debug stuff
Sep 17, 2012
9aa3f92
squash into drop sdl
Sep 21, 2012
0ac9a81
X11: real XConfigureEvents have position relative parent
Sep 23, 2012
2e2db91
squash fix compile error
Sep 23, 2012
8b33140
squash somewhere
Sep 23, 2012
f51b37d
X11: create _NET_WM_STATE_FULLSCREEN windows with windowed size
Sep 23, 2012
58fd64b
X11: use xserver defined key repeat instead of internal
Sep 23, 2012
9e6bcd0
squash: must do refresh window after setting fullscreen flag
Sep 23, 2012
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion xbmc/Application.cpp
Expand Up @@ -794,7 +794,7 @@ bool CApplication::CreateGUI()

uint32_t sdlFlags = 0;

#if defined(HAS_SDL_OPENGL) || (HAS_GLES == 2)
#if (defined(HAS_SDL_OPENGL) || (HAS_GLES == 2)) && !defined(HAS_GLX)
sdlFlags |= SDL_INIT_VIDEO;
#endif

Expand Down
10 changes: 5 additions & 5 deletions xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp
Expand Up @@ -277,7 +277,7 @@ bool CVDPAU::MakePixmapGL()
};

GLXFBConfig *fbConfigs;
fbConfigs = glXChooseFBConfig(m_Display, DefaultScreen(m_Display), doubleVisAttributes, &num);
fbConfigs = glXChooseFBConfig(m_Display, g_Windowing.GetVisual()->screen, doubleVisAttributes, &num);
if (fbConfigs==NULL)
{
CLog::Log(LOGERROR, "GLX Error: MakePixmap: No compatible framebuffers found");
Expand Down Expand Up @@ -328,10 +328,10 @@ bool CVDPAU::MakePixmap(int width, int height)

// Get our window attribs.
XWindowAttributes wndattribs;
XGetWindowAttributes(m_Display, DefaultRootWindow(m_Display), &wndattribs); // returns a status but I don't know what success is
XGetWindowAttributes(m_Display, g_Windowing.GetWindow(), &wndattribs); // returns a status but I don't know what success is

m_Pixmap = XCreatePixmap(m_Display,
DefaultRootWindow(m_Display),
g_Windowing.GetWindow(),
OutWidth,
OutHeight,
wndattribs.depth);
Expand All @@ -343,7 +343,7 @@ bool CVDPAU::MakePixmap(int width, int height)

XGCValues values = {};
GC xgc;
values.foreground = BlackPixel (m_Display, DefaultScreen (m_Display));
values.foreground = BlackPixel (m_Display, g_Windowing.GetVisual()->screen);
xgc = XCreateGC(m_Display, m_Pixmap, GCForeground, &values);
XFillRectangle(m_Display, m_Pixmap, xgc, 0, 0, OutWidth, OutHeight);
XFreeGC(m_Display, xgc);
Expand Down Expand Up @@ -755,7 +755,7 @@ void CVDPAU::InitVDPAUProcs()
return;
}

int mScreen = DefaultScreen(m_Display);
int mScreen = g_Windowing.GetVisual()->screen;
VdpStatus vdp_st;

// Create Device
Expand Down
3 changes: 3 additions & 0 deletions xbmc/guilib/Resolution.h
Expand Up @@ -95,6 +95,7 @@ struct RESOLUTION_INFO
CStdString strMode;
CStdString strOutput;
CStdString strId;
int iInternal; /* internal to windowing layer */
public:
RESOLUTION_INFO(int width = 1280, int height = 720, float aspect = 0, const CStdString &mode = "")
{
Expand All @@ -105,6 +106,7 @@ struct RESOLUTION_INFO
bFullScreen = true;
fRefreshRate = 0;
dwFlags = iSubtitles = iScreen = 0;
iInternal = 0;
}
float DisplayRatio() const
{
Expand All @@ -117,5 +119,6 @@ struct RESOLUTION_INFO
iSubtitles = res.iSubtitles; dwFlags = res.dwFlags;
fPixelRatio = res.fPixelRatio; fRefreshRate = res.fRefreshRate;
strMode = res.strMode; strOutput = res.strOutput; strId = res.strId;
iInternal = res.iInternal;
}
};
2 changes: 2 additions & 0 deletions xbmc/input/XBMC_keytable.cpp
Expand Up @@ -179,6 +179,8 @@ static const XBMCKEYTABLE XBMCKeyTable[] =
, { XBMCK_LAUNCH_APP2, 0, 0, XBMCVK_LAUNCH_APP2, "launch_app2_pc_icon" }
, { XBMCK_LAUNCH_FILE_BROWSER, 0, 0, XBMCVK_LAUNCH_FILE_BROWSER, "launch_file_browser" }
, { XBMCK_LAUNCH_MEDIA_CENTER, 0, 0, XBMCVK_LAUNCH_MEDIA_CENTER, "launch_media_center" }
, { XBMCK_PLAY, 0, 0, XBMCVK_MEDIA_PLAY_PAUSE, "play_pause" }
, { XBMCK_STOP, 0, 0, XBMCVK_MEDIA_STOP, "stop" }

// Function keys
, { XBMCK_F1, 0, 0, XBMCVK_F1, "f1"}
Expand Down
1 change: 1 addition & 0 deletions xbmc/rendering/gl/RenderSystemGL.cpp
Expand Up @@ -175,6 +175,7 @@ bool CRenderSystemGL::ResetRenderSystem(int width, int height, bool fullScreen,
{
m_width = width;
m_height = height;
m_bVsyncInit = false;

glClearColor( 0.0f, 0.0f, 0.0f, 0.0f );

Expand Down
5 changes: 5 additions & 0 deletions xbmc/system.h
Expand Up @@ -162,16 +162,21 @@
#define HAS_GL
#ifdef HAVE_X11
#define HAS_GLX
#define HAS_X11_WIN_EVENTS
#endif
#ifdef HAVE_SDL
#define HAS_SDL
#ifndef HAS_SDL_OPENGL
#define HAS_SDL_OPENGL
#endif
#ifndef HAS_X11_WIN_EVENTS
#define HAS_SDL_WIN_EVENTS
#endif
#else
#ifndef HAS_X11_WIN_EVENTS
#define HAS_LINUX_EVENTS
#endif
#endif
#define HAS_LINUX_NETWORK
#define HAS_LIRC
#ifdef HAVE_LIBPULSE
Expand Down
1 change: 1 addition & 0 deletions xbmc/windowing/Makefile
@@ -1,6 +1,7 @@
SRCS=WinEventsSDL.cpp \
WinEventsLinux.cpp \
WinSystem.cpp \
WinEventsX11.cpp \

LIB=windowing.a

Expand Down
4 changes: 4 additions & 0 deletions xbmc/windowing/WinEvents.h
Expand Up @@ -58,6 +58,10 @@ class CWinEventsBase
#include "WinEventsSDL.h"
#define CWinEvents CWinEventsSDL

#elif defined(TARGET_LINUX) && defined(HAS_X11_WIN_EVENTS)
#include "WinEventsX11.h"
#define CWinEvents CWinEventsX11

#elif defined(TARGET_LINUX) && defined(HAS_LINUX_EVENTS)
#include "WinEventsLinux.h"
#define CWinEvents CWinEventsLinux
Expand Down