mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 01:29:42 -06:00
Merge branch 'master' into GLSL-master
Conflicts: Source/Core/VideoCommon/Src/PixelShaderGen.cpp Source/Plugins/Plugin_VideoDX11/Src/VertexManager.cpp Source/Plugins/Plugin_VideoDX9/Src/VertexManager.cpp
This commit is contained in:
@ -74,6 +74,20 @@ Core::GetWindowHandle().
|
||||
|
||||
#include <wx/datetime.h> // wxWidgets
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifndef SM_YVIRTUALSCREEN
|
||||
#define SM_YVIRTUALSCREEN 77
|
||||
#endif
|
||||
#ifndef SM_XVIRTUALSCREEN
|
||||
#define SM_XVIRTUALSCREEN 76
|
||||
#endif
|
||||
#ifndef SM_CXVIRTUALSCREEN
|
||||
#define SM_CXVIRTUALSCREEN 78
|
||||
#endif
|
||||
#ifndef SM_CYVIRTUALSCREEN
|
||||
#define SM_CYVIRTUALSCREEN 79
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Resources
|
||||
extern "C" {
|
||||
@ -861,14 +875,23 @@ void CFrame::StartGame(const std::string& filename)
|
||||
position = wxDefaultPosition;
|
||||
#endif
|
||||
|
||||
wxSize size(SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowWidth,
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowHeight);
|
||||
#ifdef _WIN32
|
||||
// Out of desktop check
|
||||
int height = GetSystemMetrics(SM_CYVIRTUALSCREEN);
|
||||
int width = GetSystemMetrics(SM_CXVIRTUALSCREEN);
|
||||
int leftPos = GetSystemMetrics(SM_XVIRTUALSCREEN);
|
||||
int topPos = GetSystemMetrics(SM_YVIRTUALSCREEN);
|
||||
if ((leftPos + width) < (position.x + size.GetWidth()) || leftPos > position.x || (topPos + height) < (position.y + size.GetHeight()) || topPos > position.y)
|
||||
position.x = position.y = wxDefaultCoord;
|
||||
#endif
|
||||
m_RenderFrame = new CRenderFrame((wxFrame*)this, wxID_ANY, _("Dolphin"), position);
|
||||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bKeepWindowOnTop)
|
||||
m_RenderFrame->SetWindowStyle(m_RenderFrame->GetWindowStyle() | wxSTAY_ON_TOP);
|
||||
else
|
||||
m_RenderFrame->SetWindowStyle(m_RenderFrame->GetWindowStyle() & ~wxSTAY_ON_TOP);
|
||||
|
||||
wxSize size(SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowWidth,
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowHeight);
|
||||
m_RenderFrame->SetClientSize(size.GetWidth(), size.GetHeight());
|
||||
m_RenderFrame->Bind(wxEVT_CLOSE_WINDOW, &CFrame::OnRenderParentClose, this);
|
||||
m_RenderFrame->Bind(wxEVT_ACTIVATE, &CFrame::OnActive, this);
|
||||
|
@ -316,7 +316,7 @@ void CISOProperties::CreateGUIControls(bool IsWad)
|
||||
DCBZOFF->SetToolTip(_("Bypass the clearing of the data cache by the DCBZ instruction. Usually leave this option disabled."));
|
||||
VBeam = new wxCheckBox(m_GameConfig, ID_VBEAM, _("Accurate VBeam emulation"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator);
|
||||
VBeam->SetToolTip(_("If the FPS is erratic, this option may help. (ON = Compatible, OFF = Fast)"));
|
||||
SyncGPU = new wxCheckBox(m_GameConfig, ID_SYNCGPU, _("Sychronise GPU thread"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator);
|
||||
SyncGPU = new wxCheckBox(m_GameConfig, ID_SYNCGPU, _("Synchronise GPU thread"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator);
|
||||
SyncGPU->SetToolTip(_("Synchonises the GPU and CPU threads to help prevent random freezes in Dual Core mode. (ON = Compatible, OFF = Fast)"));
|
||||
FastDiscSpeed = new wxCheckBox(m_GameConfig, ID_DISCSPEED, _("Speed up Disc Transfer Rate"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator);
|
||||
FastDiscSpeed->SetToolTip(_("Enable fast disc access. Needed for a few games. (ON = Fast, OFF = Compatible)"));
|
||||
@ -659,8 +659,8 @@ void CISOProperties::OnExtractFile(wxCommandEvent& WXUNUSED (event))
|
||||
|
||||
if (DiscIO::IsVolumeWiiDisc(OpenISO))
|
||||
{
|
||||
int partitionNum = wxAtoi(File.SubString(10, 11));
|
||||
File.Remove(0, 12); // Remove "Partition x/"
|
||||
int partitionNum = wxAtoi(File.Mid(File.find_first_of("/"), 1));
|
||||
File.Remove(0, File.find_first_of("/") +1); // Remove "Partition x/"
|
||||
WiiDisc.at(partitionNum).FileSystem->ExportFile(WxStrToStr(File).c_str(), WxStrToStr(Path).c_str());
|
||||
}
|
||||
else
|
||||
@ -794,8 +794,8 @@ void CISOProperties::OnExtractDir(wxCommandEvent& event)
|
||||
|
||||
if (DiscIO::IsVolumeWiiDisc(OpenISO))
|
||||
{
|
||||
int partitionNum = wxAtoi(Directory.SubString(10, 11));
|
||||
Directory.Remove(0, 12); // Remove "Partition x/"
|
||||
int partitionNum = wxAtoi(Directory.Mid(Directory.find_first_of("/"), 1));
|
||||
Directory.Remove(0, Directory.find_first_of("/") +1); // Remove "Partition x/"
|
||||
ExportDir(WxStrToStr(Directory).c_str(), WxStrToStr(Path).c_str(), partitionNum);
|
||||
}
|
||||
else
|
||||
@ -860,7 +860,7 @@ void CISOProperties::CheckPartitionIntegrity(wxCommandEvent& event)
|
||||
return;
|
||||
|
||||
// Get the partition number from the item text ("Partition N")
|
||||
int PartitionNum = wxAtoi(PartitionName.SubString(10, 11));
|
||||
int PartitionNum = wxAtoi(PartitionName.Mid(PartitionName.find_first_of("0123456789"), 1));
|
||||
const WiiPartition& Partition = WiiDisc[PartitionNum];
|
||||
|
||||
wxProgressDialog* dialog = new wxProgressDialog(
|
||||
|
@ -48,6 +48,20 @@
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <shellapi.h>
|
||||
|
||||
#ifndef SM_YVIRTUALSCREEN
|
||||
#define SM_YVIRTUALSCREEN 77
|
||||
#endif
|
||||
#ifndef SM_XVIRTUALSCREEN
|
||||
#define SM_XVIRTUALSCREEN 76
|
||||
#endif
|
||||
#ifndef SM_CXVIRTUALSCREEN
|
||||
#define SM_CXVIRTUALSCREEN 78
|
||||
#endif
|
||||
#ifndef SM_CYVIRTUALSCREEN
|
||||
#define SM_CYVIRTUALSCREEN 79
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
@ -166,6 +180,11 @@ bool DolphinApp::OnInit()
|
||||
"Low level (LLE) or high level (HLE) audio",
|
||||
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL
|
||||
},
|
||||
{
|
||||
wxCMD_LINE_OPTION, "m", "movie",
|
||||
"Play a movie file",
|
||||
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL
|
||||
},
|
||||
{
|
||||
wxCMD_LINE_NONE, NULL, NULL, NULL, wxCMD_LINE_VAL_NONE, 0
|
||||
}
|
||||
@ -186,6 +205,7 @@ bool DolphinApp::OnInit()
|
||||
&videoBackendName);
|
||||
selectAudioEmulation = parser.Found(wxT("audio_emulation"),
|
||||
&audioEmulationName);
|
||||
playMovie = parser.Found(wxT("movie"), &movieFile);
|
||||
#endif // wxUSE_CMDLINE_PARSER
|
||||
|
||||
#if defined _DEBUG && defined _WIN32
|
||||
@ -303,10 +323,11 @@ bool DolphinApp::OnInit()
|
||||
// do not allow windows to be created off the desktop.
|
||||
#ifdef _WIN32
|
||||
// Out of desktop check
|
||||
HWND hDesktop = GetDesktopWindow();
|
||||
RECT rc;
|
||||
GetWindowRect(hDesktop, &rc);
|
||||
if (rc.right < x + w || rc.bottom < y + h)
|
||||
int height = GetSystemMetrics(SM_CYVIRTUALSCREEN);
|
||||
int width = GetSystemMetrics(SM_CXVIRTUALSCREEN);
|
||||
int leftPos = GetSystemMetrics(SM_XVIRTUALSCREEN);
|
||||
int topPos = GetSystemMetrics(SM_YVIRTUALSCREEN);
|
||||
if ((leftPos + width) < (x + w) || leftPos > x || (topPos + height) < (y + h) || topPos > y)
|
||||
x = y = wxDefaultCoord;
|
||||
#elif defined __APPLE__
|
||||
if (y < 1)
|
||||
@ -346,8 +367,21 @@ void DolphinApp::AfterInit(wxTimerEvent& WXUNUSED(event))
|
||||
if (!BatchMode)
|
||||
main_frame->UpdateGameList();
|
||||
|
||||
if (playMovie && movieFile != wxEmptyString)
|
||||
{
|
||||
if (Movie::PlayInput(movieFile.char_str()))
|
||||
{
|
||||
if (LoadFile && FileToLoad != wxEmptyString)
|
||||
{
|
||||
main_frame->BootGame(WxStrToStr(FileToLoad));
|
||||
}
|
||||
else
|
||||
main_frame->BootGame(std::string(""));
|
||||
}
|
||||
}
|
||||
|
||||
// First check if we have an exec command line.
|
||||
if (LoadFile && FileToLoad != wxEmptyString)
|
||||
else if (LoadFile && FileToLoad != wxEmptyString)
|
||||
{
|
||||
main_frame->BootGame(WxStrToStr(FileToLoad));
|
||||
}
|
||||
@ -357,17 +391,7 @@ void DolphinApp::AfterInit(wxTimerEvent& WXUNUSED(event))
|
||||
{
|
||||
if (main_frame->g_pCodeWindow->AutomaticStart())
|
||||
{
|
||||
if(!SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDefaultGCM.empty()
|
||||
&& File::Exists(SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDefaultGCM))
|
||||
{
|
||||
main_frame->BootGame(SConfig::GetInstance().m_LocalCoreStartupParameter.
|
||||
m_strDefaultGCM);
|
||||
}
|
||||
else if(!SConfig::GetInstance().m_LastFilename.empty()
|
||||
&& File::Exists(SConfig::GetInstance().m_LastFilename))
|
||||
{
|
||||
main_frame->BootGame(SConfig::GetInstance().m_LastFilename);
|
||||
}
|
||||
main_frame->BootGame("");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -40,7 +40,9 @@ private:
|
||||
wxTimer *m_afterinit;
|
||||
bool BatchMode;
|
||||
bool LoadFile;
|
||||
bool playMovie;
|
||||
wxString FileToLoad;
|
||||
wxString movieFile;
|
||||
wxLocale *m_locale;
|
||||
|
||||
void AfterInit(wxTimerEvent& WXUNUSED(event));
|
||||
|
Reference in New Issue
Block a user