mirror of https://github.com/PCSX2/pcsx2.git
GSdx: added ltrapper's modifications.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1538 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
e58776e095
commit
4a7304d6f7
|
@ -81,7 +81,7 @@ void GPUSettingsDlg::OnInit()
|
||||||
memset(&mode, 0, sizeof(mode));
|
memset(&mode, 0, sizeof(mode));
|
||||||
m_modes.push_back(mode);
|
m_modes.push_back(mode);
|
||||||
|
|
||||||
ComboBoxAppend(IDC_RESOLUTION, "Windowed", (LPARAM)&m_modes.back(), true);
|
ComboBoxAppend(IDC_RESOLUTION, "Please select...", (LPARAM)&m_modes.back(), true);
|
||||||
|
|
||||||
if(CComPtr<IDirect3D9> d3d = Direct3DCreate9(D3D_SDK_VERSION))
|
if(CComPtr<IDirect3D9> d3d = Direct3DCreate9(D3D_SDK_VERSION))
|
||||||
{
|
{
|
||||||
|
@ -124,6 +124,8 @@ void GPUSettingsDlg::OnInit()
|
||||||
ComboBoxInit(IDC_ASPECTRATIO, g_aspectratio, countof(g_aspectratio), theApp.GetConfig("AspectRatio", 1));
|
ComboBoxInit(IDC_ASPECTRATIO, g_aspectratio, countof(g_aspectratio), theApp.GetConfig("AspectRatio", 1));
|
||||||
ComboBoxInit(IDC_SCALE, g_scale, countof(g_scale), theApp.GetConfig("scale_x", 0) | (theApp.GetConfig("scale_y", 0) << 2));
|
ComboBoxInit(IDC_SCALE, g_scale, countof(g_scale), theApp.GetConfig("scale_x", 0) | (theApp.GetConfig("scale_y", 0) << 2));
|
||||||
|
|
||||||
|
CheckDlgButton(m_hWnd, IDC_WINDOWED, theApp.GetConfig("windowed", 1));
|
||||||
|
|
||||||
SendMessage(GetDlgItem(m_hWnd, IDC_SWTHREADS), UDM_SETRANGE, 0, MAKELPARAM(16, 1));
|
SendMessage(GetDlgItem(m_hWnd, IDC_SWTHREADS), UDM_SETRANGE, 0, MAKELPARAM(16, 1));
|
||||||
SendMessage(GetDlgItem(m_hWnd, IDC_SWTHREADS), UDM_SETPOS, 0, MAKELPARAM(theApp.GetConfig("swthreads", 1), 0));
|
SendMessage(GetDlgItem(m_hWnd, IDC_SWTHREADS), UDM_SETPOS, 0, MAKELPARAM(theApp.GetConfig("swthreads", 1), 0));
|
||||||
|
|
||||||
|
@ -176,6 +178,7 @@ bool GPUSettingsDlg::OnCommand(HWND hWnd, UINT id, UINT code)
|
||||||
}
|
}
|
||||||
|
|
||||||
theApp.SetConfig("swthreads", (int)SendMessage(GetDlgItem(m_hWnd, IDC_SWTHREADS), UDM_GETPOS, 0, 0));
|
theApp.SetConfig("swthreads", (int)SendMessage(GetDlgItem(m_hWnd, IDC_SWTHREADS), UDM_GETPOS, 0, 0));
|
||||||
|
theApp.SetConfig("windowed", (int)IsDlgButtonChecked(m_hWnd, IDC_WINDOWED));
|
||||||
}
|
}
|
||||||
|
|
||||||
return __super::OnCommand(hWnd, id, code);
|
return __super::OnCommand(hWnd, id, code);
|
||||||
|
|
|
@ -139,7 +139,10 @@ static INT32 GSopen(void* dsp, char* title, int mt, int renderer)
|
||||||
case 13: s_gs = new GSRendererNull(s_basemem, !!mt, s_irq, new GSDeviceNull()); break;
|
case 13: s_gs = new GSRendererNull(s_basemem, !!mt, s_irq, new GSDeviceNull()); break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!s_gs->Create(title))
|
int w = theApp.GetConfig("ModeWidth", 0);
|
||||||
|
int h = theApp.GetConfig("ModeHeight", 0);
|
||||||
|
|
||||||
|
if(!s_gs->Create(title, w, h))
|
||||||
{
|
{
|
||||||
GSclose();
|
GSclose();
|
||||||
|
|
||||||
|
|
|
@ -394,14 +394,13 @@ __forceinline void GSClut::WriteCLUT_T32_I4_CSM1(const uint32* RESTRICT src, uin
|
||||||
GSVector4i v2 = s[2];
|
GSVector4i v2 = s[2];
|
||||||
GSVector4i v3 = s[3];
|
GSVector4i v3 = s[3];
|
||||||
|
|
||||||
GSVector4i::sw64(v0, v1, v2, v3);
|
|
||||||
GSVector4i::sw16(v0, v1, v2, v3);
|
GSVector4i::sw16(v0, v1, v2, v3);
|
||||||
|
GSVector4i::sw32(v0, v1, v2, v3);
|
||||||
GSVector4i::sw16(v0, v2, v1, v3);
|
GSVector4i::sw16(v0, v2, v1, v3);
|
||||||
GSVector4i::sw16(v0, v1, v2, v3);
|
|
||||||
|
|
||||||
d[0] = v0;
|
d[0] = v0;
|
||||||
d[1] = v1;
|
d[1] = v2;
|
||||||
d[32] = v2;
|
d[32] = v1;
|
||||||
d[33] = v3;
|
d[33] = v3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -88,7 +88,7 @@ CRC::Game CRC::m_games[] =
|
||||||
{0xC19A374E, SoTC, US, 0},
|
{0xC19A374E, SoTC, US, 0},
|
||||||
{0x7D8F539A, SoTC, EU, 0},
|
{0x7D8F539A, SoTC, EU, 0},
|
||||||
{0x3122B508, OnePieceGrandAdventure, US, 0},
|
{0x3122B508, OnePieceGrandAdventure, US, 0},
|
||||||
{0x8DF14A24, OnePieceGrandAdventure, Unknown, 0},
|
{0x8DF14A24, OnePieceGrandAdventure, EU, 0},
|
||||||
{0xB049DD5E, OnePieceGrandBattle, US, 0},
|
{0xB049DD5E, OnePieceGrandBattle, US, 0},
|
||||||
{0x5D02CC5B, OnePieceGrandBattle, Unknown, 0},
|
{0x5D02CC5B, OnePieceGrandBattle, Unknown, 0},
|
||||||
{0x6F8545DB, ICO, US, 0},
|
{0x6F8545DB, ICO, US, 0},
|
||||||
|
|
|
@ -108,7 +108,7 @@ bool GSDevice9::Create(GSWnd* wnd, bool vsync)
|
||||||
|
|
||||||
m_d3d->GetDeviceCaps(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, &m_d3dcaps);
|
m_d3d->GetDeviceCaps(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, &m_d3dcaps);
|
||||||
|
|
||||||
if(!Reset(1, 1, theApp.GetConfig("ModeWidth", 0) > 0 ? Fullscreen : Windowed)) return false;
|
if(!Reset(1, 1, theApp.GetConfig("windowed", 1) ? Windowed : Fullscreen)) return false;
|
||||||
|
|
||||||
m_dev->Clear(0, NULL, D3DCLEAR_TARGET, 0, 1.0f, 0);
|
m_dev->Clear(0, NULL, D3DCLEAR_TARGET, 0, 1.0f, 0);
|
||||||
|
|
||||||
|
|
|
@ -54,9 +54,9 @@ GSRenderer::~GSRenderer()
|
||||||
delete m_dev;
|
delete m_dev;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GSRenderer::Create(const string& title)
|
bool GSRenderer::Create(const string& title, int w, int h)
|
||||||
{
|
{
|
||||||
if(!m_wnd.Create(title.c_str()))
|
if(!m_wnd.Create(title.c_str(), w, h))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,7 +73,7 @@ public:
|
||||||
GSRenderer(uint8* base, bool mt, void (*irq)(), GSDevice* dev);
|
GSRenderer(uint8* base, bool mt, void (*irq)(), GSDevice* dev);
|
||||||
virtual ~GSRenderer();
|
virtual ~GSRenderer();
|
||||||
|
|
||||||
virtual bool Create(const string& title);
|
virtual bool Create(const string& title, int w, int h);
|
||||||
virtual void VSync(int field);
|
virtual void VSync(int field);
|
||||||
virtual bool MakeSnapshot(const string& path);
|
virtual bool MakeSnapshot(const string& path);
|
||||||
virtual void KeyEvent(GSKeyEventData* e);
|
virtual void KeyEvent(GSKeyEventData* e);
|
||||||
|
|
|
@ -54,9 +54,9 @@ public:
|
||||||
delete m_tfx;
|
delete m_tfx;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Create(const string& title)
|
bool Create(const string& title, int w, int h)
|
||||||
{
|
{
|
||||||
if(!__super::Create(title))
|
if(!__super::Create(title, w, h))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if(!m_tfx->Create(m_dev))
|
if(!m_tfx->Create(m_dev))
|
||||||
|
|
|
@ -30,9 +30,9 @@ GSRendererDX10::GSRendererDX10(uint8* base, bool mt, void (*irq)())
|
||||||
InitVertexKick<GSRendererDX10>();
|
InitVertexKick<GSRendererDX10>();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GSRendererDX10::Create(const string& title)
|
bool GSRendererDX10::Create(const string& title, int w, int h)
|
||||||
{
|
{
|
||||||
if(!__super::Create(title))
|
if(!__super::Create(title, w, h))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -41,7 +41,7 @@ protected:
|
||||||
public:
|
public:
|
||||||
GSRendererDX10(uint8* base, bool mt, void (*irq)());
|
GSRendererDX10(uint8* base, bool mt, void (*irq)());
|
||||||
|
|
||||||
bool Create(const string& title);
|
bool Create(const string& title, int w, int h);
|
||||||
|
|
||||||
template<uint32 prim, uint32 tme, uint32 fst> void VertexKick(bool skip);
|
template<uint32 prim, uint32 tme, uint32 fst> void VertexKick(bool skip);
|
||||||
};
|
};
|
|
@ -30,9 +30,9 @@ GSRendererDX11::GSRendererDX11(uint8* base, bool mt, void (*irq)())
|
||||||
InitVertexKick<GSRendererDX11>();
|
InitVertexKick<GSRendererDX11>();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GSRendererDX11::Create(const string& title)
|
bool GSRendererDX11::Create(const string& title, int w, int h)
|
||||||
{
|
{
|
||||||
if(!__super::Create(title))
|
if(!__super::Create(title, w, h))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -42,7 +42,7 @@ protected:
|
||||||
public:
|
public:
|
||||||
GSRendererDX11(uint8* base, bool mt, void (*irq)());
|
GSRendererDX11(uint8* base, bool mt, void (*irq)());
|
||||||
|
|
||||||
bool Create(const string& title);
|
bool Create(const string& title, int w, int h);
|
||||||
|
|
||||||
template<uint32 prim, uint32 tme, uint32 fst> void VertexKick(bool skip);
|
template<uint32 prim, uint32 tme, uint32 fst> void VertexKick(bool skip);
|
||||||
};
|
};
|
|
@ -30,9 +30,9 @@ GSRendererDX9::GSRendererDX9(uint8* base, bool mt, void (*irq)())
|
||||||
InitVertexKick<GSRendererDX9>();
|
InitVertexKick<GSRendererDX9>();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GSRendererDX9::Create(const string& title)
|
bool GSRendererDX9::Create(const string& title, int w, int h)
|
||||||
{
|
{
|
||||||
if(!__super::Create(title))
|
if(!__super::Create(title, w, h))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -48,7 +48,7 @@ protected:
|
||||||
public:
|
public:
|
||||||
GSRendererDX9(uint8* base, bool mt, void (*irq)());
|
GSRendererDX9(uint8* base, bool mt, void (*irq)());
|
||||||
|
|
||||||
bool Create(const string& title);
|
bool Create(const string& title, int w, int h);
|
||||||
|
|
||||||
template<uint32 prim, uint32 tme, uint32 fst> void VertexKick(bool skip);
|
template<uint32 prim, uint32 tme, uint32 fst> void VertexKick(bool skip);
|
||||||
};
|
};
|
||||||
|
|
|
@ -30,9 +30,9 @@ GSRendererOGL::GSRendererOGL(uint8* base, bool mt, void (*irq)())
|
||||||
InitVertexKick<GSRendererOGL>();
|
InitVertexKick<GSRendererOGL>();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GSRendererOGL::Create(const string& title)
|
bool GSRendererOGL::Create(const string& title, int w, int h)
|
||||||
{
|
{
|
||||||
if(!__super::Create(title))
|
if(!__super::Create(title, w, h))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
|
|
|
@ -34,7 +34,7 @@ protected:
|
||||||
public:
|
public:
|
||||||
GSRendererOGL(uint8* base, bool mt, void (*irq)());
|
GSRendererOGL(uint8* base, bool mt, void (*irq)());
|
||||||
|
|
||||||
bool Create(const string& title);
|
bool Create(const string& title, int w, int h);
|
||||||
|
|
||||||
template<uint32 prim, uint32 tme, uint32 fst> void VertexKick(bool skip);
|
template<uint32 prim, uint32 tme, uint32 fst> void VertexKick(bool skip);
|
||||||
};
|
};
|
|
@ -79,7 +79,7 @@ void GSSettingsDlg::OnInit()
|
||||||
memset(&mode, 0, sizeof(mode));
|
memset(&mode, 0, sizeof(mode));
|
||||||
m_modes.push_back(mode);
|
m_modes.push_back(mode);
|
||||||
|
|
||||||
ComboBoxAppend(IDC_RESOLUTION, "Windowed", (LPARAM)&m_modes.back(), true);
|
ComboBoxAppend(IDC_RESOLUTION, "Please select...", (LPARAM)&m_modes.back(), true);
|
||||||
|
|
||||||
if(CComPtr<IDirect3D9> d3d = Direct3DCreate9(D3D_SDK_VERSION))
|
if(CComPtr<IDirect3D9> d3d = Direct3DCreate9(D3D_SDK_VERSION))
|
||||||
{
|
{
|
||||||
|
@ -120,6 +120,7 @@ void GSSettingsDlg::OnInit()
|
||||||
ComboBoxInit(IDC_INTERLACE, g_interlace, countof(g_interlace), theApp.GetConfig("Interlace", 0));
|
ComboBoxInit(IDC_INTERLACE, g_interlace, countof(g_interlace), theApp.GetConfig("Interlace", 0));
|
||||||
ComboBoxInit(IDC_ASPECTRATIO, g_aspectratio, countof(g_aspectratio), theApp.GetConfig("AspectRatio", 1));
|
ComboBoxInit(IDC_ASPECTRATIO, g_aspectratio, countof(g_aspectratio), theApp.GetConfig("AspectRatio", 1));
|
||||||
|
|
||||||
|
CheckDlgButton(m_hWnd, IDC_WINDOWED, theApp.GetConfig("windowed", 1));
|
||||||
CheckDlgButton(m_hWnd, IDC_FILTER, theApp.GetConfig("filter", 2));
|
CheckDlgButton(m_hWnd, IDC_FILTER, theApp.GetConfig("filter", 2));
|
||||||
CheckDlgButton(m_hWnd, IDC_PALTEX, theApp.GetConfig("paltex", 1));
|
CheckDlgButton(m_hWnd, IDC_PALTEX, theApp.GetConfig("paltex", 1));
|
||||||
CheckDlgButton(m_hWnd, IDC_VSYNC, theApp.GetConfig("vsync", 0));
|
CheckDlgButton(m_hWnd, IDC_VSYNC, theApp.GetConfig("vsync", 0));
|
||||||
|
@ -179,6 +180,7 @@ bool GSSettingsDlg::OnCommand(HWND hWnd, UINT id, UINT code)
|
||||||
theApp.SetConfig("AspectRatio", (int)data);
|
theApp.SetConfig("AspectRatio", (int)data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
theApp.SetConfig("windowed", (int)IsDlgButtonChecked(m_hWnd, IDC_WINDOWED));
|
||||||
theApp.SetConfig("filter", (int)IsDlgButtonChecked(m_hWnd, IDC_FILTER));
|
theApp.SetConfig("filter", (int)IsDlgButtonChecked(m_hWnd, IDC_FILTER));
|
||||||
theApp.SetConfig("paltex", (int)IsDlgButtonChecked(m_hWnd, IDC_PALTEX));
|
theApp.SetConfig("paltex", (int)IsDlgButtonChecked(m_hWnd, IDC_PALTEX));
|
||||||
theApp.SetConfig("vsync", (int)IsDlgButtonChecked(m_hWnd, IDC_VSYNC));
|
theApp.SetConfig("vsync", (int)IsDlgButtonChecked(m_hWnd, IDC_VSYNC));
|
||||||
|
@ -215,7 +217,7 @@ void GSSettingsDlg::UpdateControls()
|
||||||
// TODO: ShowWindow(GetDlgItem(m_hWnd, IDC_LOGO11), dx11 ? SW_SHOW : SW_HIDE);
|
// TODO: ShowWindow(GetDlgItem(m_hWnd, IDC_LOGO11), dx11 ? SW_SHOW : SW_HIDE);
|
||||||
// TODO: ShowWindow(GetDlgItem(m_hWnd, IDC_LOGO_OGL), ogl ? SW_SHOW : SW_HIDE);
|
// TODO: ShowWindow(GetDlgItem(m_hWnd, IDC_LOGO_OGL), ogl ? SW_SHOW : SW_HIDE);
|
||||||
|
|
||||||
EnableWindow(GetDlgItem(m_hWnd, IDC_RESOLUTION), dx9);
|
EnableWindow(GetDlgItem(m_hWnd, IDC_WINDOWED), dx9);
|
||||||
EnableWindow(GetDlgItem(m_hWnd, IDC_RESX), hw && !native);
|
EnableWindow(GetDlgItem(m_hWnd, IDC_RESX), hw && !native);
|
||||||
EnableWindow(GetDlgItem(m_hWnd, IDC_RESX_EDIT), hw && !native);
|
EnableWindow(GetDlgItem(m_hWnd, IDC_RESX_EDIT), hw && !native);
|
||||||
EnableWindow(GetDlgItem(m_hWnd, IDC_RESY), hw && !native);
|
EnableWindow(GetDlgItem(m_hWnd, IDC_RESY), hw && !native);
|
||||||
|
|
|
@ -1947,9 +1947,9 @@ bool GSC_OnePieceGrandAdventure(const GSFrameInfo& fi, int& skip)
|
||||||
{
|
{
|
||||||
if(skip == 0)
|
if(skip == 0)
|
||||||
{
|
{
|
||||||
if(fi.TME && fi.FBP == 0x02d00 && fi.FPSM == PSM_PSMCT16 && (fi.TBP0 == 0x00000 || fi.TBP0 == 0x00e00) && fi.TPSM == PSM_PSMCT16)
|
if(fi.TME && fi.FBP == 0x02d00 && fi.FPSM == PSM_PSMCT16 && (fi.TBP0 == 0x00000 || fi.TBP0 == 0x00e00 || fi.TBP0 == 0x00f00) && fi.TPSM == PSM_PSMCT16)
|
||||||
{
|
{
|
||||||
skip = 3;
|
skip = 4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -327,7 +327,6 @@ void GSTextureFX10::UpdateOM(OMDepthStencilSelector dssel, OMBlendSelector bsel,
|
||||||
|
|
||||||
if(om_dss == NULL)
|
if(om_dss == NULL)
|
||||||
{
|
{
|
||||||
|
|
||||||
D3D10_DEPTH_STENCIL_DESC dsd;
|
D3D10_DEPTH_STENCIL_DESC dsd;
|
||||||
|
|
||||||
memset(&dsd, 0, sizeof(dsd));
|
memset(&dsd, 0, sizeof(dsd));
|
||||||
|
|
|
@ -36,7 +36,7 @@ class GSTextureFX10 : public GSTextureFX
|
||||||
CComPtr<ID3D10SamplerState> m_palette_ss;
|
CComPtr<ID3D10SamplerState> m_palette_ss;
|
||||||
// hash_map<uint32, CComPtr<ID3D10DepthStencilState> > m_om_dss;
|
// hash_map<uint32, CComPtr<ID3D10DepthStencilState> > m_om_dss;
|
||||||
CComPtr<ID3D10DepthStencilState> m_om_dss[32];
|
CComPtr<ID3D10DepthStencilState> m_om_dss[32];
|
||||||
hash_map<uint32, CComPtr<ID3D10BlendState> > m_om_bs;
|
hash_map<uint32, CComPtr<ID3D10BlendState> > m_om_bs;
|
||||||
|
|
||||||
VSConstantBuffer m_vs_cb_cache;
|
VSConstantBuffer m_vs_cb_cache;
|
||||||
PSConstantBuffer m_ps_cb_cache;
|
PSConstantBuffer m_ps_cb_cache;
|
||||||
|
|
|
@ -75,24 +75,8 @@ LRESULT GSWnd::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
return DefWindowProc(m_hWnd, message, wParam, lParam);
|
return DefWindowProc(m_hWnd, message, wParam, lParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GSWnd::Create(const string& title)
|
bool GSWnd::Create(const string& title, int w, int h)
|
||||||
{
|
{
|
||||||
GSVector4i r;
|
|
||||||
|
|
||||||
GetWindowRect(GetDesktopWindow(), r);
|
|
||||||
|
|
||||||
int w = r.width() / 3;
|
|
||||||
int h = r.width() / 4;
|
|
||||||
|
|
||||||
if(!GetSystemMetrics(SM_REMOTESESSION))
|
|
||||||
{
|
|
||||||
w *= 2;
|
|
||||||
h *= 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
int x = (r.left + r.right - w) / 2;
|
|
||||||
int y = (r.top + r.bottom - h) / 2;
|
|
||||||
|
|
||||||
WNDCLASS wc;
|
WNDCLASS wc;
|
||||||
|
|
||||||
memset(&wc, 0, sizeof(wc));
|
memset(&wc, 0, sizeof(wc));
|
||||||
|
@ -115,7 +99,32 @@ bool GSWnd::Create(const string& title)
|
||||||
|
|
||||||
DWORD style = WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_OVERLAPPEDWINDOW | WS_BORDER;
|
DWORD style = WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_OVERLAPPEDWINDOW | WS_BORDER;
|
||||||
|
|
||||||
m_hWnd = CreateWindow(wc.lpszClassName, title.c_str(), style, x, y, w, h, NULL, NULL, wc.hInstance, (LPVOID)this);
|
GSVector4i r;
|
||||||
|
|
||||||
|
GetWindowRect(GetDesktopWindow(), r);
|
||||||
|
|
||||||
|
bool remote = !!GetSystemMetrics(SM_REMOTESESSION);
|
||||||
|
|
||||||
|
if(w <= 0 || h <= 0 || remote)
|
||||||
|
{
|
||||||
|
w = r.width() / 3;
|
||||||
|
h = r.width() / 4;
|
||||||
|
|
||||||
|
if(!remote)
|
||||||
|
{
|
||||||
|
w *= 2;
|
||||||
|
h *= 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
r.left = (r.left + r.right - w) / 2;
|
||||||
|
r.top = (r.top + r.bottom - h) / 2;
|
||||||
|
r.right = r.left + w;
|
||||||
|
r.bottom = r.top + h;
|
||||||
|
|
||||||
|
AdjustWindowRect(r, style, FALSE);
|
||||||
|
|
||||||
|
m_hWnd = CreateWindow(wc.lpszClassName, title.c_str(), style, r.left, r.top, r.width(), r.height(), NULL, NULL, wc.hInstance, (LPVOID)this);
|
||||||
|
|
||||||
if(!m_hWnd)
|
if(!m_hWnd)
|
||||||
{
|
{
|
||||||
|
|
|
@ -34,7 +34,7 @@ public:
|
||||||
GSWnd();
|
GSWnd();
|
||||||
virtual ~GSWnd();
|
virtual ~GSWnd();
|
||||||
|
|
||||||
bool Create(const string& title);
|
bool Create(const string& title, int w, int h);
|
||||||
bool Attach(HWND hWnd);
|
bool Attach(HWND hWnd);
|
||||||
|
|
||||||
void* GetHandle() {return m_hWnd;}
|
void* GetHandle() {return m_hWnd;}
|
||||||
|
|
|
@ -110,9 +110,10 @@ BEGIN
|
||||||
CONTROL "Logarithmic Z",IDC_LOGZ,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,89,153,58,10
|
CONTROL "Logarithmic Z",IDC_LOGZ,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,89,153,58,10
|
||||||
CONTROL "Allow 8-bit textures",IDC_PALTEX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,165,82,10
|
CONTROL "Allow 8-bit textures",IDC_PALTEX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,165,82,10
|
||||||
CONTROL "Alpha correction (FBA)",IDC_FBA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,89,166,93,10
|
CONTROL "Alpha correction (FBA)",IDC_FBA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,89,166,93,10
|
||||||
CONTROL "Wait vsync",IDC_VSYNC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,177,51,10
|
CONTROL "Wait VSync",IDC_VSYNC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,180,51,10
|
||||||
CONTROL "Edge anti-aliasing (AA1, sw-mode only)",IDC_AA1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,190,141,10
|
CONTROL "Windowed",IDC_WINDOWED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,89,180,93,10
|
||||||
CONTROL "Enable output merger blur effect",IDC_BLUR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,204,121,10
|
CONTROL "Edge anti-aliasing (AA1, sw-mode only)",IDC_AA1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,194,141,10
|
||||||
|
CONTROL "Enable output merger blur effect",IDC_BLUR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,208,121,10
|
||||||
DEFPUSHBUTTON "OK",IDOK,43,232,50,14
|
DEFPUSHBUTTON "OK",IDOK,43,232,50,14
|
||||||
PUSHBUTTON "Cancel",IDCANCEL,96,232,50,14
|
PUSHBUTTON "Cancel",IDCANCEL,96,232,50,14
|
||||||
END
|
END
|
||||||
|
@ -149,14 +150,15 @@ BEGIN
|
||||||
COMBOBOX IDC_DITHERING,78,102,104,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
COMBOBOX IDC_DITHERING,78,102,104,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||||
LTEXT "Aspect Ratio (PgDn):",IDC_STATIC,7,120,68,8
|
LTEXT "Aspect Ratio (PgDn):",IDC_STATIC,7,120,68,8
|
||||||
COMBOBOX IDC_ASPECTRATIO,78,117,104,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
COMBOBOX IDC_ASPECTRATIO,78,117,104,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||||
LTEXT "Rendering Threads:",IDC_STATIC,7,150,64,8
|
LTEXT "Rendering Threads:",IDC_STATIC,7,157,64,8
|
||||||
EDITTEXT IDC_SWTHREADS_EDIT,78,148,35,13,ES_AUTOHSCROLL | ES_NUMBER
|
EDITTEXT IDC_SWTHREADS_EDIT,78,155,35,13,ES_AUTOHSCROLL | ES_NUMBER
|
||||||
CONTROL "",IDC_SWTHREADS,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,99,154,11,14
|
CONTROL "",IDC_SWTHREADS,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,99,161,11,14
|
||||||
DEFPUSHBUTTON "OK",IDOK,43,178,50,14
|
DEFPUSHBUTTON "OK",IDOK,43,178,50,14
|
||||||
PUSHBUTTON "Cancel",IDCANCEL,96,178,50,14
|
PUSHBUTTON "Cancel",IDCANCEL,96,178,50,14
|
||||||
CONTROL 2022,IDC_LOGO10,"Static",SS_BITMAP,7,7,173,42
|
CONTROL 2022,IDC_LOGO10,"Static",SS_BITMAP,7,7,173,42
|
||||||
LTEXT "Internal Resolution:",IDC_STATIC,7,135,64,8
|
LTEXT "Internal Resolution:",IDC_STATIC,7,135,64,8
|
||||||
COMBOBOX IDC_SCALE,78,132,104,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
COMBOBOX IDC_SCALE,78,132,104,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||||
|
CONTROL "Windowed",IDC_WINDOWED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,157,49,10
|
||||||
END
|
END
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -40,6 +40,7 @@
|
||||||
#define IDC_WIDTH 2036
|
#define IDC_WIDTH 2036
|
||||||
#define IDC_HEIGHT 2037
|
#define IDC_HEIGHT 2037
|
||||||
#define IDC_CONFIGURE 2038
|
#define IDC_CONFIGURE 2038
|
||||||
|
#define IDC_WINDOWED 2039
|
||||||
#define IDR_CONVERT_FX 10000
|
#define IDR_CONVERT_FX 10000
|
||||||
#define IDR_TFX_FX 10001
|
#define IDR_TFX_FX 10001
|
||||||
#define IDR_MERGE_FX 10002
|
#define IDR_MERGE_FX 10002
|
||||||
|
@ -51,7 +52,7 @@
|
||||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||||
#define _APS_NEXT_RESOURCE_VALUE 10004
|
#define _APS_NEXT_RESOURCE_VALUE 10004
|
||||||
#define _APS_NEXT_COMMAND_VALUE 32771
|
#define _APS_NEXT_COMMAND_VALUE 32771
|
||||||
#define _APS_NEXT_CONTROL_VALUE 2039
|
#define _APS_NEXT_CONTROL_VALUE 2040
|
||||||
#define _APS_NEXT_SYMED_VALUE 5000
|
#define _APS_NEXT_SYMED_VALUE 5000
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue