mirror of https://github.com/PCSX2/pcsx2.git
GSdx: linux: polish window management.
1/ Allow a resize of the render zone. 2/ Do not update title in fullscreen which create some flashes git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4591 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
6c41b01390
commit
7029f7aa98
|
@ -380,10 +380,14 @@ Display* GSWnd::GetDisplay()
|
|||
|
||||
GSVector4i GSWnd::GetClientRect()
|
||||
{
|
||||
// TODO
|
||||
int h, w;
|
||||
w = theApp.GetConfig("ModeWidth", 640);
|
||||
h = theApp.GetConfig("ModeHeight", 480);
|
||||
// Get all SDL events. It refreshes the window parameter do not ask why.
|
||||
// Anyway it allow to properly resize the window surface
|
||||
// FIXME: it does not feel a good solution -- Gregory
|
||||
SDL_PumpEvents();
|
||||
|
||||
int h = 480;
|
||||
int w = 640;
|
||||
if (m_window) SDL_GetWindowSize(m_window, &w, &h);
|
||||
|
||||
return GSVector4i(0, 0, w, h);
|
||||
}
|
||||
|
@ -393,6 +397,16 @@ GSVector4i GSWnd::GetClientRect()
|
|||
|
||||
bool GSWnd::SetWindowText(const char* title)
|
||||
{
|
||||
// Do not find anyway to check the current fullscreen status
|
||||
// Better than nothing heuristic, check the window position. Fullscreen = (0,0)
|
||||
// if(!(m_window->flags & SDL_WINDOW_FULLSCREEN) ) // Do not compile
|
||||
//
|
||||
// Same as GetClientRect. We call SDL_PumpEvents to refresh x and y value
|
||||
// FIXME: it does not feel a good solution -- Gregory
|
||||
SDL_PumpEvents();
|
||||
int x,y = 0;
|
||||
SDL_GetWindowPosition(m_window, &x, &y);
|
||||
if ( x && y )
|
||||
SDL_SetWindowTitle(m_window, title);
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue