readded skin support
(only DirectDraw supports it) git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@127 a31d4220-a93d-0410-bf67-fe4944624d44
This commit is contained in:
parent
f3547062b5
commit
a4a2f0a3a3
|
@ -2112,6 +2112,10 @@
|
||||||
RelativePath=".\src\win32\SelectPlugin.h"
|
RelativePath=".\src\win32\SelectPlugin.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\win32\skin.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\src\win32\StringTokenizer.h"
|
RelativePath=".\src\win32\StringTokenizer.h"
|
||||||
>
|
>
|
||||||
|
@ -2268,7 +2272,7 @@
|
||||||
<Globals>
|
<Globals>
|
||||||
<Global
|
<Global
|
||||||
Name="RESOURCE_FILE"
|
Name="RESOURCE_FILE"
|
||||||
Value="res\VBA.rc"
|
Value="src\win32\VBA.rc"
|
||||||
/>
|
/>
|
||||||
</Globals>
|
</Globals>
|
||||||
</VisualStudioProject>
|
</VisualStudioProject>
|
||||||
|
|
|
@ -104,8 +104,8 @@ struct {
|
||||||
{ "OptionsVideoRenderDDRAW", ID_OPTIONS_VIDEO_RENDERMETHOD_DIRECTDRAW },
|
{ "OptionsVideoRenderDDRAW", ID_OPTIONS_VIDEO_RENDERMETHOD_DIRECTDRAW },
|
||||||
{ "OptionsVideoRenderD3D", ID_OPTIONS_VIDEO_RENDERMETHOD_DIRECT3D },
|
{ "OptionsVideoRenderD3D", ID_OPTIONS_VIDEO_RENDERMETHOD_DIRECT3D },
|
||||||
{ "OptionsVideoRenderOGL", ID_OPTIONS_VIDEO_RENDERMETHOD_OPENGL },
|
{ "OptionsVideoRenderOGL", ID_OPTIONS_VIDEO_RENDERMETHOD_OPENGL },
|
||||||
{ "OptionsVideoRenderSelectSkin", ID_OPTIONS_VIDEO_RENDEROPTIONS_SELECTSKIN },
|
{ "OptionsUserInterfaceSkinSelect", ID_SKIN_SELECT },
|
||||||
{ "OptionsVideoRenderSkin", ID_OPTIONS_VIDEO_RENDEROPTIONS_SKIN },
|
{ "OptionsUserInterfaceSkinUse", ID_SKIN_USE },
|
||||||
{ "OptionsVideoVsync", ID_OPTIONS_VIDEO_VSYNC },
|
{ "OptionsVideoVsync", ID_OPTIONS_VIDEO_VSYNC },
|
||||||
{ "OptionsVideoX1", ID_OPTIONS_VIDEO_X1 },
|
{ "OptionsVideoX1", ID_OPTIONS_VIDEO_X1 },
|
||||||
{ "OptionsVideoX2", ID_OPTIONS_VIDEO_X2 },
|
{ "OptionsVideoX2", ID_OPTIONS_VIDEO_X2 },
|
||||||
|
|
|
@ -181,10 +181,6 @@ BEGIN_MESSAGE_MAP(MainWnd, CWnd)
|
||||||
ON_COMMAND(ID_OPTIONS_VIDEO_RENDEROPTIONS_GLPOLYGONS, OnOptionsVideoRenderoptionsGlpolygons)
|
ON_COMMAND(ID_OPTIONS_VIDEO_RENDEROPTIONS_GLPOLYGONS, OnOptionsVideoRenderoptionsGlpolygons)
|
||||||
ON_UPDATE_COMMAND_UI(ID_OPTIONS_VIDEO_RENDEROPTIONS_GLPOLYGONS, OnUpdateOptionsVideoRenderoptionsGlpolygons)
|
ON_UPDATE_COMMAND_UI(ID_OPTIONS_VIDEO_RENDEROPTIONS_GLPOLYGONS, OnUpdateOptionsVideoRenderoptionsGlpolygons)
|
||||||
|
|
||||||
ON_COMMAND(ID_OPTIONS_VIDEO_RENDEROPTIONS_SELECTSKIN, OnOptionsVideoRenderoptionsSelectskin)
|
|
||||||
ON_UPDATE_COMMAND_UI(ID_OPTIONS_VIDEO_RENDEROPTIONS_SELECTSKIN, OnUpdateOptionsVideoRenderoptionsSelectskin)
|
|
||||||
ON_COMMAND(ID_OPTIONS_VIDEO_RENDEROPTIONS_SKIN, OnOptionsVideoRenderoptionsSkin)
|
|
||||||
ON_UPDATE_COMMAND_UI(ID_OPTIONS_VIDEO_RENDEROPTIONS_SKIN, OnUpdateOptionsVideoRenderoptionsSkin)
|
|
||||||
ON_WM_CONTEXTMENU()
|
ON_WM_CONTEXTMENU()
|
||||||
ON_COMMAND(ID_OPTIONS_EMULATOR_ASSOCIATE, OnOptionsEmulatorAssociate)
|
ON_COMMAND(ID_OPTIONS_EMULATOR_ASSOCIATE, OnOptionsEmulatorAssociate)
|
||||||
ON_COMMAND(ID_OPTIONS_EMULATOR_DIRECTORIES, OnOptionsEmulatorDirectories)
|
ON_COMMAND(ID_OPTIONS_EMULATOR_DIRECTORIES, OnOptionsEmulatorDirectories)
|
||||||
|
@ -452,6 +448,10 @@ BEGIN_MESSAGE_MAP(MainWnd, CWnd)
|
||||||
ON_UPDATE_COMMAND_UI_RANGE(ID_OPTIONS_SOUND_PCMINTERPOLATION_NONE, ID_OPTIONS_SOUND_PCMINTERPOLATION_LIBRESAMPLE, OnUpdateOptionsSoundPcminterpolation)
|
ON_UPDATE_COMMAND_UI_RANGE(ID_OPTIONS_SOUND_PCMINTERPOLATION_NONE, ID_OPTIONS_SOUND_PCMINTERPOLATION_LIBRESAMPLE, OnUpdateOptionsSoundPcminterpolation)
|
||||||
ON_WM_SETFOCUS()
|
ON_WM_SETFOCUS()
|
||||||
ON_WM_KILLFOCUS()
|
ON_WM_KILLFOCUS()
|
||||||
|
ON_COMMAND(ID_SKIN_USE, &MainWnd::OnSkinUse)
|
||||||
|
ON_UPDATE_COMMAND_UI(ID_SKIN_USE, &MainWnd::OnUpdateSkinUse)
|
||||||
|
ON_COMMAND(ID_SKIN_SELECT, &MainWnd::OnSkinSelect)
|
||||||
|
ON_UPDATE_COMMAND_UI(ID_SKIN_SELECT, &MainWnd::OnUpdateSkinSelect)
|
||||||
END_MESSAGE_MAP()
|
END_MESSAGE_MAP()
|
||||||
|
|
||||||
|
|
||||||
|
@ -1319,4 +1319,3 @@ LRESULT MainWnd::OnMySysCommand(WPARAM wParam, LPARAM lParam)
|
||||||
}
|
}
|
||||||
return Default();
|
return Default();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -448,6 +448,10 @@ public:
|
||||||
afx_msg void OnUpdateOptionsLinkRFU(CCmdUI* pCmdUI) ;
|
afx_msg void OnUpdateOptionsLinkRFU(CCmdUI* pCmdUI) ;
|
||||||
afx_msg void OnOptionsLinkEnable() ;
|
afx_msg void OnOptionsLinkEnable() ;
|
||||||
afx_msg void OnUpdateOptionsLinkEnable(CCmdUI* pCmdUI) ;
|
afx_msg void OnUpdateOptionsLinkEnable(CCmdUI* pCmdUI) ;
|
||||||
|
afx_msg void OnSkinUse();
|
||||||
|
afx_msg void OnUpdateSkinUse(CCmdUI *pCmdUI);
|
||||||
|
afx_msg void OnSkinSelect();
|
||||||
|
afx_msg void OnUpdateSkinSelect(CCmdUI *pCmdUI);
|
||||||
};
|
};
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -611,77 +611,11 @@ void MainWnd::OnOptionsVideoRenderoptionsGlpolygons()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWnd::OnUpdateOptionsVideoRenderoptionsGlpolygons(CCmdUI* pCmdUI)
|
void MainWnd::OnUpdateOptionsVideoRenderoptionsGlpolygons(CCmdUI* pCmdUI)
|
||||||
{
|
{
|
||||||
pCmdUI->SetCheck(theApp.glType == 2);
|
pCmdUI->SetCheck(theApp.glType == 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWnd::OnOptionsVideoRenderoptionsSelectskin()
|
|
||||||
{
|
|
||||||
#ifndef NOSKINS
|
|
||||||
LPCTSTR exts[] = {".ini" };
|
|
||||||
CString filter = winLoadFilter(IDS_FILTER_INI);
|
|
||||||
CString title = winResLoadString(IDS_SELECT_SKIN_FILE);
|
|
||||||
|
|
||||||
FileDlg dlg(this,
|
|
||||||
theApp.skinName,
|
|
||||||
filter,
|
|
||||||
0,
|
|
||||||
"INI",
|
|
||||||
exts,
|
|
||||||
"",
|
|
||||||
title,
|
|
||||||
false);
|
|
||||||
|
|
||||||
if(dlg.DoModal() == IDCANCEL) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool result = false;
|
|
||||||
if(!theApp.skinEnabled) {
|
|
||||||
theApp.skinEnabled = !theApp.skinEnabled;
|
|
||||||
regSetDwordValue("skinEnabled", theApp.skinEnabled);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(theApp.skin && theApp.skinEnabled) {
|
|
||||||
delete theApp.skin;
|
|
||||||
theApp.skin = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
theApp.skinName = dlg.GetPathName();
|
|
||||||
|
|
||||||
theApp.winUpdateSkin();
|
|
||||||
theApp.winAccelMgr.UpdateMenu(theApp.menu);
|
|
||||||
#else
|
|
||||||
systemMessage( 0, _T("This build of VBA does not support skins!") );
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWnd::OnUpdateOptionsVideoRenderoptionsSelectskin(CCmdUI* pCmdUI)
|
|
||||||
{
|
|
||||||
pCmdUI->Enable(theApp.display && theApp.display->isSkinSupported() &&
|
|
||||||
theApp.videoOption <= VIDEO_4X);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWnd::OnOptionsVideoRenderoptionsSkin()
|
|
||||||
{
|
|
||||||
#ifndef NOSKINS
|
|
||||||
theApp.skinEnabled = !theApp.skinEnabled;
|
|
||||||
theApp.updateRenderMethod(true);
|
|
||||||
theApp.winAccelMgr.UpdateMenu(theApp.menu);
|
|
||||||
#else
|
|
||||||
systemMessage( 0, _T("This build of VBA does not support skins!") );
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWnd::OnUpdateOptionsVideoRenderoptionsSkin(CCmdUI* pCmdUI)
|
|
||||||
{
|
|
||||||
pCmdUI->SetCheck(theApp.skinEnabled);
|
|
||||||
pCmdUI->Enable(theApp.display && theApp.display->isSkinSupported() && theApp.videoOption <= VIDEO_4X);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWnd::OnOptionsEmulatorAssociate()
|
void MainWnd::OnOptionsEmulatorAssociate()
|
||||||
{
|
{
|
||||||
theApp.winCheckFullscreen();
|
theApp.winCheckFullscreen();
|
||||||
|
@ -1965,3 +1899,75 @@ void MainWnd::OnOptionsSelectPlugin()
|
||||||
theApp.updateFilter();
|
theApp.updateFilter();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWnd::OnSkinUse()
|
||||||
|
{
|
||||||
|
#ifndef NOSKINS
|
||||||
|
theApp.skinEnabled = !theApp.skinEnabled;
|
||||||
|
theApp.updateRenderMethod(true);
|
||||||
|
theApp.winAccelMgr.UpdateMenu(theApp.menu);
|
||||||
|
#else
|
||||||
|
systemMessage( 0, _T("This build of VBA does not support skins!") );
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWnd::OnUpdateSkinUse(CCmdUI *pCmdUI)
|
||||||
|
{
|
||||||
|
#ifndef NOSKINS
|
||||||
|
pCmdUI->SetCheck( theApp.skinEnabled );
|
||||||
|
pCmdUI->Enable( theApp.display && theApp.display->isSkinSupported() && theApp.videoOption <= VIDEO_4X );
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWnd::OnSkinSelect()
|
||||||
|
{
|
||||||
|
#ifndef NOSKINS
|
||||||
|
LPCTSTR exts[] = { ".ini" };
|
||||||
|
CString filter = winLoadFilter( IDS_FILTER_INI );
|
||||||
|
CString title = winResLoadString( IDS_SELECT_SKIN_FILE );
|
||||||
|
|
||||||
|
FileDlg dlg(
|
||||||
|
this,
|
||||||
|
theApp.skinName,
|
||||||
|
filter,
|
||||||
|
0,
|
||||||
|
"INI",
|
||||||
|
exts,
|
||||||
|
"",
|
||||||
|
title,
|
||||||
|
false);
|
||||||
|
|
||||||
|
if( dlg.DoModal() == IDCANCEL ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool result = false;
|
||||||
|
if( !theApp.skinEnabled ) {
|
||||||
|
theApp.skinEnabled = !theApp.skinEnabled;
|
||||||
|
regSetDwordValue( "skinEnabled", theApp.skinEnabled );
|
||||||
|
}
|
||||||
|
|
||||||
|
if( theApp.skin && theApp.skinEnabled ) {
|
||||||
|
delete theApp.skin;
|
||||||
|
theApp.skin = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
theApp.skinName = dlg.GetPathName();
|
||||||
|
|
||||||
|
theApp.winUpdateSkin();
|
||||||
|
theApp.winAccelMgr.UpdateMenu( theApp.menu );
|
||||||
|
#else
|
||||||
|
systemMessage( 0, _T("This build of VBA does not support skins!") );
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWnd::OnUpdateSkinSelect(CCmdUI *pCmdUI)
|
||||||
|
{
|
||||||
|
#ifndef NOSKINS
|
||||||
|
pCmdUI->Enable(
|
||||||
|
theApp.display &&
|
||||||
|
theApp.display->isSkinSupported() &&
|
||||||
|
theApp.videoOption <= VIDEO_4X
|
||||||
|
);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
|
@ -38,6 +38,8 @@
|
||||||
#include "../System.h"
|
#include "../System.h"
|
||||||
#include "../Util.h"
|
#include "../Util.h"
|
||||||
|
|
||||||
|
#include "skin.h"
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// VBA:
|
// VBA:
|
||||||
// See VBA.cpp for the implementation of this class
|
// See VBA.cpp for the implementation of this class
|
||||||
|
@ -65,7 +67,7 @@ enum pixelFilterType
|
||||||
|
|
||||||
#define REWIND_SIZE 400000
|
#define REWIND_SIZE 400000
|
||||||
|
|
||||||
class CSkin;
|
//class CSkin;
|
||||||
class AVIWrite;
|
class AVIWrite;
|
||||||
class WavWriter;
|
class WavWriter;
|
||||||
|
|
||||||
|
|
|
@ -1786,13 +1786,21 @@ BEGIN
|
||||||
MENUITEM SEPARATOR
|
MENUITEM SEPARATOR
|
||||||
MENUITEM "&Colors...", ID_OPTIONS_GAMEBOY_COLORS
|
MENUITEM "&Colors...", ID_OPTIONS_GAMEBOY_COLORS
|
||||||
END
|
END
|
||||||
|
POPUP "&User Interface"
|
||||||
|
BEGIN
|
||||||
POPUP "&Language"
|
POPUP "&Language"
|
||||||
BEGIN
|
BEGIN
|
||||||
MENUITEM "&System", ID_OPTIONS_LANGUAGE_SYSTEM
|
MENUITEM "&System", ID_OPTIONS_LANGUAGE_SYSTEM
|
||||||
MENUITEM "&English", ID_OPTIONS_LANGUAGE_ENGLISH
|
MENUITEM "&English", ID_OPTIONS_LANGUAGE_ENGLISH
|
||||||
MENUITEM "&Other...", ID_OPTIONS_LANGUAGE_OTHER
|
MENUITEM "&Other...", ID_OPTIONS_LANGUAGE_OTHER
|
||||||
END
|
END
|
||||||
POPUP "Li&nk"
|
POPUP "&Skin"
|
||||||
|
BEGIN
|
||||||
|
MENUITEM "&Use", ID_SKIN_USE
|
||||||
|
MENUITEM "&Select", ID_SKIN_SELECT
|
||||||
|
END
|
||||||
|
END
|
||||||
|
POPUP "&Link"
|
||||||
BEGIN
|
BEGIN
|
||||||
MENUITEM "Enable GBA Linking", ID_OPTIONS_LINK_ENABLE
|
MENUITEM "Enable GBA Linking", ID_OPTIONS_LINK_ENABLE
|
||||||
MENUITEM "&Wireless Adapter", ID_OPTIONS_LINK_WIRELESSADAPTER
|
MENUITEM "&Wireless Adapter", ID_OPTIONS_LINK_WIRELESSADAPTER
|
||||||
|
|
|
@ -716,8 +716,6 @@
|
||||||
#define ID_OPTIONS_VIDEO_RENDEROPTIONS_GLBILINEAR 40238
|
#define ID_OPTIONS_VIDEO_RENDEROPTIONS_GLBILINEAR 40238
|
||||||
#define ID_OPTIONS_VIDEO_RENDEROPTIONS_GLTRIANGLE 40239
|
#define ID_OPTIONS_VIDEO_RENDEROPTIONS_GLTRIANGLE 40239
|
||||||
#define ID_OPTIONS_VIDEO_RENDEROPTIONS_GLQUADS 40240
|
#define ID_OPTIONS_VIDEO_RENDEROPTIONS_GLQUADS 40240
|
||||||
#define ID_OPTIONS_VIDEO_RENDEROPTIONS_SELECTSKIN 40245
|
|
||||||
#define ID_OPTIONS_VIDEO_RENDEROPTIONS_SKIN 40246
|
|
||||||
#define ID_OPTIONS_EMULATOR_AGBPRINT 40247
|
#define ID_OPTIONS_EMULATOR_AGBPRINT 40247
|
||||||
#define ID_OPTIONS_EMULATOR_REALTIMECLOCK 40248
|
#define ID_OPTIONS_EMULATOR_REALTIMECLOCK 40248
|
||||||
#define ID_OPTIONS_GAMEBOY_SGB2 40249
|
#define ID_OPTIONS_GAMEBOY_SGB2 40249
|
||||||
|
@ -798,6 +796,11 @@
|
||||||
#define ID_OPTIONS_LINK_ENABLE 40335
|
#define ID_OPTIONS_LINK_ENABLE 40335
|
||||||
#define ID_RENDERAPI_VERTEX 40336
|
#define ID_RENDERAPI_VERTEX 40336
|
||||||
#define ID_OPTIONS_VIDEO_RENDEROPTIONS_GLPOLYGONS 40337
|
#define ID_OPTIONS_VIDEO_RENDEROPTIONS_GLPOLYGONS 40337
|
||||||
|
#define ID_VIDEO_SKIN 40338
|
||||||
|
#define ID_OPTIONS_UI 40339
|
||||||
|
#define ID_USERINTERFACE_SKIN 40340
|
||||||
|
#define ID_SKIN_USE 40341
|
||||||
|
#define ID_SKIN_SELECT 40342
|
||||||
#define ID_OPTIONS_FILTER_PLUGIN 40343
|
#define ID_OPTIONS_FILTER_PLUGIN 40343
|
||||||
#define ID_OPTIONS_SELECT_PLUGIN 40344
|
#define ID_OPTIONS_SELECT_PLUGIN 40344
|
||||||
#define IDC_COMBO_PLUGIN 40345
|
#define IDC_COMBO_PLUGIN 40345
|
||||||
|
@ -807,7 +810,7 @@
|
||||||
#ifdef APSTUDIO_INVOKED
|
#ifdef APSTUDIO_INVOKED
|
||||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||||
#define _APS_NEXT_RESOURCE_VALUE 159
|
#define _APS_NEXT_RESOURCE_VALUE 159
|
||||||
#define _APS_NEXT_COMMAND_VALUE 40338
|
#define _APS_NEXT_COMMAND_VALUE 40343
|
||||||
#define _APS_NEXT_CONTROL_VALUE 1269
|
#define _APS_NEXT_CONTROL_VALUE 1269
|
||||||
#define _APS_NEXT_SYMED_VALUE 103
|
#define _APS_NEXT_SYMED_VALUE 103
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue