mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
fix for fullscreen for both video plugins in windows
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@243 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
e0b3e32860
commit
e84721b13b
@ -2,6 +2,7 @@
|
||||
#include <windows.h>
|
||||
|
||||
#include "../../Core/Src/Core.h"
|
||||
#include "Globals.h"
|
||||
#include "EmuWindow.h"
|
||||
|
||||
namespace EmuWindow
|
||||
@ -68,7 +69,7 @@ namespace EmuWindow
|
||||
}
|
||||
|
||||
|
||||
HWND OpenWindow(HWND parent, HINSTANCE hInstance, bool windowed, int width, int height, const TCHAR *title)
|
||||
HWND OpenWindow(HWND parent, HINSTANCE hInstance, int width, int height, const TCHAR *title)
|
||||
{
|
||||
wndClass.cbSize = sizeof( wndClass );
|
||||
wndClass.style = CS_HREDRAW | CS_VREDRAW;
|
||||
@ -86,7 +87,7 @@ namespace EmuWindow
|
||||
m_hInstance = hInstance;
|
||||
RegisterClassEx( &wndClass );
|
||||
|
||||
if (parent && windowed)
|
||||
if (parent)
|
||||
{
|
||||
m_hWnd = CreateWindow(m_szClassName, title,
|
||||
WS_CHILD,
|
||||
@ -99,7 +100,7 @@ namespace EmuWindow
|
||||
}
|
||||
else
|
||||
{
|
||||
DWORD style = windowed ? WS_OVERLAPPEDWINDOW : WS_POPUP;
|
||||
DWORD style = g_Config.bFullscreen ? WS_POPUP : WS_OVERLAPPEDWINDOW;
|
||||
|
||||
RECT rc = {0, 0, width, height};
|
||||
AdjustWindowRect(&rc, style, false);
|
||||
@ -135,7 +136,7 @@ namespace EmuWindow
|
||||
|
||||
HWND Create(HWND hParent, HINSTANCE hInstance, const TCHAR *title)
|
||||
{
|
||||
return OpenWindow(hParent, hInstance, true, 640, 480, title);
|
||||
return OpenWindow(hParent, hInstance, 640, 480, title);
|
||||
}
|
||||
|
||||
void Close()
|
||||
|
@ -155,19 +155,21 @@ bool OpenGL_Create(SVideoInitialize &_VideoInitialize, int _iwidth, int _iheight
|
||||
|
||||
#if defined(_WIN32)
|
||||
// create the window
|
||||
if (!g_Config.renderToMainframe || g_VideoInitialize.pWindowHandle == NULL) {
|
||||
// create the window
|
||||
if (!g_Config.renderToMainframe || g_VideoInitialize.pWindowHandle == NULL)
|
||||
{
|
||||
g_VideoInitialize.pWindowHandle = (void*)EmuWindow::Create(NULL, g_hInstance, "Please wait...");
|
||||
if (g_VideoInitialize.pWindowHandle == NULL) {
|
||||
SysMessage("failed to create window");
|
||||
return false;
|
||||
}
|
||||
EmuWindow::Show();
|
||||
}
|
||||
else
|
||||
{
|
||||
g_VideoInitialize.pWindowHandle = (void*)EmuWindow::Create((HWND)g_VideoInitialize.pWindowHandle, g_hInstance, "Please wait...");
|
||||
}
|
||||
EmuWindow::Show();
|
||||
|
||||
if (g_VideoInitialize.pWindowHandle == NULL)
|
||||
{
|
||||
SysMessage("failed to create window");
|
||||
return false;
|
||||
}
|
||||
|
||||
GLuint PixelFormat; // Holds The Results After Searching For A Match
|
||||
DWORD dwExStyle; // Window Extended Style
|
||||
@ -197,17 +199,18 @@ bool OpenGL_Create(SVideoInitialize &_VideoInitialize, int _iwidth, int _iheight
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
// change to default resolution
|
||||
ChangeDisplaySettings(NULL, 0);
|
||||
}
|
||||
|
||||
if (g_Config.bFullscreen) {
|
||||
dwExStyle=WS_EX_APPWINDOW;
|
||||
dwStyle=WS_POPUP;
|
||||
//ShowCursor(FALSE);
|
||||
if (g_Config.bFullscreen && !g_Config.renderToMainframe)
|
||||
{
|
||||
ShowCursor(FALSE);
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
dwExStyle=WS_EX_APPWINDOW | WS_EX_WINDOWEDGE;
|
||||
dwStyle=WS_OVERLAPPEDWINDOW;
|
||||
}
|
||||
@ -391,7 +394,7 @@ bool OpenGL_Create(SVideoInitialize &_VideoInitialize, int _iwidth, int _iheight
|
||||
XMapRaised(GLWin.dpy, GLWin.win);
|
||||
}
|
||||
#else
|
||||
//SDL fo other OS (osx, bsd, ...)
|
||||
//SDL for other OS (osx, bsd, ...)
|
||||
int videoFlags = SDL_OPENGL;
|
||||
SDL_Surface *screen;
|
||||
const SDL_VideoInfo *videoInfo;
|
||||
@ -409,7 +412,7 @@ bool OpenGL_Create(SVideoInitialize &_VideoInitialize, int _iwidth, int _iheight
|
||||
SDL_Quit();
|
||||
return false;
|
||||
}
|
||||
//hw o sw ogl ?
|
||||
//hw or sw ogl ?
|
||||
if (videoInfo->hw_available)
|
||||
videoFlags |= SDL_HWSURFACE;
|
||||
else
|
||||
|
@ -103,10 +103,9 @@ void ConfigDialog::CreateGUIControls()
|
||||
|
||||
wxStaticText *AAText = new wxStaticText(m_PageVideo, ID_AATEXT, wxT("Anti-alias mode:"), wxDefaultPosition, wxDefaultSize, 0);
|
||||
wxArrayString arrayStringFor_AliasModeCB;
|
||||
m_AliasModeCB = new wxComboBox(m_PageVideo, ID_ALIASMODECB, wxEmptyString, wxDefaultPosition, wxDefaultSize, arrayStringFor_AliasModeCB, wxCB_READONLY, wxDefaultValidator);
|
||||
m_AliasModeCB = new wxComboBox(m_PageVideo, ID_ALIASMODECB, wxEmptyString, wxDefaultPosition, wxDefaultSize, arrayStringFor_AliasModeCB, 0, wxDefaultValidator);
|
||||
wxString tmp;
|
||||
tmp<<g_Config.iMultisampleMode;
|
||||
// since wxCB_READONLY is being used, SetValue will only succeed if tmp is in the list.
|
||||
m_AliasModeCB->SetValue(tmp);
|
||||
|
||||
//page2
|
||||
|
@ -43,7 +43,6 @@ class ConfigDialog : public wxDialog
|
||||
public:
|
||||
ConfigDialog(wxWindow *parent, wxWindowID id = 1, const wxString &title = wxT("OpenGL Plugin Configuration"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = ConfigDialog_STYLE);
|
||||
virtual ~ConfigDialog();
|
||||
void ConfigDialogActivate(wxActivateEvent& event);
|
||||
void OKClick(wxCommandEvent& event);
|
||||
void FullScreenCheck(wxCommandEvent& event);
|
||||
void RenderMainCheck(wxCommandEvent& event);
|
||||
|
@ -145,7 +145,6 @@ struct Config
|
||||
char texDumpPath[280];
|
||||
|
||||
//currently unused:
|
||||
int aa; // anti-aliasing level
|
||||
int iLog; // CONF_ bits
|
||||
int iSaveTargetId;
|
||||
int iAdapter;
|
||||
|
@ -135,7 +135,7 @@ namespace EmuWindow
|
||||
}
|
||||
|
||||
|
||||
HWND OpenWindow(HWND parent, HINSTANCE hInstance, bool windowed, int width, int height, const TCHAR *title)
|
||||
HWND OpenWindow(HWND parent, HINSTANCE hInstance, int width, int height, const TCHAR *title)
|
||||
{
|
||||
wndClass.cbSize = sizeof( wndClass );
|
||||
wndClass.style = CS_HREDRAW | CS_VREDRAW;
|
||||
@ -153,7 +153,7 @@ namespace EmuWindow
|
||||
m_hInstance = hInstance;
|
||||
RegisterClassEx( &wndClass );
|
||||
|
||||
if (parent && windowed)
|
||||
if (parent)
|
||||
{
|
||||
m_hWnd = CreateWindow(m_szClassName, title,
|
||||
WS_CHILD,
|
||||
@ -166,7 +166,7 @@ namespace EmuWindow
|
||||
}
|
||||
else
|
||||
{
|
||||
DWORD style = windowed ? WS_OVERLAPPEDWINDOW : WS_POPUP;
|
||||
DWORD style = g_Config.bFullscreen ? WS_POPUP : WS_OVERLAPPEDWINDOW;
|
||||
|
||||
RECT rc = {0, 0, width, height};
|
||||
AdjustWindowRect(&rc, style, false);
|
||||
@ -202,7 +202,7 @@ namespace EmuWindow
|
||||
|
||||
HWND Create(HWND hParent, HINSTANCE hInstance, const TCHAR *title)
|
||||
{
|
||||
return OpenWindow(hParent, hInstance, true, 640, 480, title);
|
||||
return OpenWindow(hParent, hInstance, 640, 480, title);
|
||||
}
|
||||
|
||||
void Close()
|
||||
|
@ -233,7 +233,7 @@ bool Renderer::Create2()
|
||||
|
||||
s_pfont = new RasterFont();
|
||||
|
||||
SetAA(g_Config.aa);
|
||||
SetAA(g_Config.iMultisampleMode);
|
||||
GL_REPORT_ERROR();
|
||||
|
||||
// load the effect, find the best profiles (if any)
|
||||
|
Loading…
Reference in New Issue
Block a user