2009-07-30 01:22:00 -06:00
// Copyright (C) 2003 Dolphin Project.
2008-12-07 22:30:24 -07:00
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, version 2.0.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License 2.0 for more details.
// A copy of the GPL 2.0 should have been included with the program.
// If not, see http://www.gnu.org/licenses/
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
# include "Globals.h"
# include "VolumeCreator.h"
# include "Filesystem.h"
# include "ISOProperties.h"
# include "PatchAddEdit.h"
2008-12-16 21:14:24 -07:00
# include "ARCodeAddEdit.h"
2009-02-14 10:32:03 -07:00
# include "ConfigManager.h"
2009-07-30 01:09:26 -06:00
# include "StringUtil.h"
2008-12-07 22:30:24 -07:00
2009-03-10 11:19:30 -06:00
struct WiiPartition
{
DiscIO : : IVolume * Partition ;
DiscIO : : IFileSystem * FileSystem ;
std : : vector < const DiscIO : : SFileInfo * > Files ;
} ;
std : : vector < WiiPartition > WiiDisc ;
2008-12-07 22:30:24 -07:00
DiscIO : : IVolume * OpenISO = NULL ;
DiscIO : : IFileSystem * pFileSystem = NULL ;
std : : vector < PatchEngine : : Patch > onFrame ;
2008-12-16 21:14:24 -07:00
std : : vector < ActionReplay : : ARCode > arCodes ;
2008-12-07 22:30:24 -07:00
BEGIN_EVENT_TABLE ( CISOProperties , wxDialog )
EVT_CLOSE ( CISOProperties : : OnClose )
EVT_BUTTON ( ID_CLOSE , CISOProperties : : OnCloseClick )
EVT_BUTTON ( ID_EDITCONFIG , CISOProperties : : OnEditConfig )
EVT_CHOICE ( ID_EMUSTATE , CISOProperties : : SetRefresh )
2009-02-21 07:40:34 -07:00
EVT_CHOICE ( ID_EMU_ISSUES , CISOProperties : : SetRefresh )
2008-12-07 22:30:24 -07:00
EVT_LISTBOX ( ID_PATCHES_LIST , CISOProperties : : ListSelectionChanged )
EVT_BUTTON ( ID_EDITPATCH , CISOProperties : : PatchButtonClicked )
EVT_BUTTON ( ID_ADDPATCH , CISOProperties : : PatchButtonClicked )
EVT_BUTTON ( ID_REMOVEPATCH , CISOProperties : : PatchButtonClicked )
EVT_LISTBOX ( ID_CHEATS_LIST , CISOProperties : : ListSelectionChanged )
EVT_BUTTON ( ID_EDITCHEAT , CISOProperties : : ActionReplayButtonClicked )
EVT_BUTTON ( ID_ADDCHEAT , CISOProperties : : ActionReplayButtonClicked )
EVT_BUTTON ( ID_REMOVECHEAT , CISOProperties : : ActionReplayButtonClicked )
EVT_MENU ( IDM_BNRSAVEAS , CISOProperties : : OnBannerImageSave )
EVT_TREE_ITEM_RIGHT_CLICK ( ID_TREECTRL , CISOProperties : : OnRightClickOnTree )
EVT_MENU ( IDM_EXTRACTFILE , CISOProperties : : OnExtractFile )
EVT_MENU ( IDM_EXTRACTDIR , CISOProperties : : OnExtractDir )
2009-02-14 10:32:03 -07:00
EVT_CHOICE ( ID_LANG , CISOProperties : : OnChangeBannerLang )
2008-12-07 22:30:24 -07:00
END_EVENT_TABLE ( )
CISOProperties : : CISOProperties ( const std : : string fileName , wxWindow * parent , wxWindowID id , const wxString & title , const wxPoint & position , const wxSize & size , long style )
: wxDialog ( parent , id , title , position , size , style )
{
2009-03-10 11:19:30 -06:00
OpenISO = DiscIO : : CreateVolumeFromFilename ( fileName ) ;
if ( DiscIO : : IsVolumeWiiDisc ( OpenISO ) )
{
2009-03-11 18:14:56 -06:00
for ( u32 i = 0 ; i < 0xFFFFFFFF ; i + + ) // yes, technically there can be that many partitions...
2009-03-10 11:19:30 -06:00
{
WiiPartition temp ;
2009-05-21 18:36:44 -06:00
if ( ( temp . Partition = DiscIO : : CreateVolumeFromFilename ( fileName , 0 , i ) ) ! = NULL )
2009-03-10 11:19:30 -06:00
{
2009-04-27 17:27:56 -06:00
if ( ( temp . FileSystem = DiscIO : : CreateFileSystem ( temp . Partition ) ) ! = NULL )
{
temp . FileSystem - > GetFileList ( temp . Files ) ;
WiiDisc . push_back ( temp ) ;
}
2009-03-10 11:19:30 -06:00
}
else
break ;
}
}
else
{
2009-06-06 20:54:07 -06:00
// TODO : Should we add a way to browse the wad file ?
if ( ! DiscIO : : IsVolumeWadFile ( OpenISO ) )
{
2009-09-04 00:52:34 -06:00
GCFiles . clear ( ) ;
2009-06-06 20:54:07 -06:00
pFileSystem = DiscIO : : CreateFileSystem ( OpenISO ) ;
pFileSystem - > GetFileList ( GCFiles ) ;
}
2009-03-10 11:19:30 -06:00
}
2008-12-07 22:30:24 -07:00
2009-02-14 10:32:03 -07:00
OpenGameListItem = new GameListItem ( fileName ) ;
2008-12-07 22:30:24 -07:00
2009-02-14 10:32:03 -07:00
bRefreshList = false ;
2009-01-28 03:21:18 -07:00
2009-06-06 20:54:07 -06:00
CreateGUIControls ( DiscIO : : IsVolumeWadFile ( OpenISO ) ) ;
2008-12-07 22:30:24 -07:00
GameIniFile = FULL_GAMECONFIG_DIR + ( OpenISO - > GetUniqueID ( ) ) + " .ini " ;
if ( GameIni . Load ( GameIniFile . c_str ( ) ) )
LoadGameConfig ( ) ;
else
{
FILE * f = fopen ( GameIniFile . c_str ( ) , " w " ) ;
fprintf ( f , " # %s - %s \n " , OpenISO - > GetUniqueID ( ) . c_str ( ) , OpenISO - > GetName ( ) . c_str ( ) ) ;
2009-01-09 09:04:28 -07:00
fprintf ( f , " [Core] Values set here will override the main dolphin settings. \n " ) ;
fprintf ( f , " [EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. \n " ) ;
fprintf ( f , " [OnFrame] Add memory patches to be applied every frame here. \n " ) ;
fprintf ( f , " [ActionReplay] Add action replay cheats here. \n " ) ;
2008-12-07 22:30:24 -07:00
fclose ( f ) ;
if ( GameIni . Load ( GameIniFile . c_str ( ) ) )
LoadGameConfig ( ) ;
else
2009-08-23 15:20:08 -06:00
wxMessageBox ( wxString : : Format ( _ ( " Could not create %s " ) , wxString : : FromAscii ( GameIniFile . c_str ( ) ) . c_str ( ) ) , _ ( " Error " ) , wxOK | wxICON_ERROR , this ) ;
2008-12-07 22:30:24 -07:00
}
// Disk header and apploader
m_Name - > SetValue ( wxString ( OpenISO - > GetName ( ) . c_str ( ) , wxConvUTF8 ) ) ;
m_GameID - > SetValue ( wxString ( OpenISO - > GetUniqueID ( ) . c_str ( ) , wxConvUTF8 ) ) ;
switch ( OpenISO - > GetCountry ( ) )
{
case DiscIO : : IVolume : : COUNTRY_EUROPE :
2009-08-23 15:20:08 -06:00
m_Country - > SetValue ( wxT ( " EUROPE " ) ) ;
2009-07-03 16:34:51 -06:00
break ;
2008-12-07 22:30:24 -07:00
case DiscIO : : IVolume : : COUNTRY_FRANCE :
2009-08-23 15:20:08 -06:00
m_Country - > SetValue ( wxT ( " FRANCE " ) ) ;
2009-07-03 16:34:51 -06:00
break ;
2009-03-07 11:03:53 -07:00
case DiscIO : : IVolume : : COUNTRY_ITALY :
2009-08-23 15:20:08 -06:00
m_Country - > SetValue ( wxT ( " ITALY " ) ) ;
2008-12-07 22:30:24 -07:00
break ;
case DiscIO : : IVolume : : COUNTRY_USA :
2009-08-23 15:20:08 -06:00
m_Country - > SetValue ( wxT ( " USA " ) ) ;
2008-12-07 22:30:24 -07:00
break ;
2009-07-03 16:34:51 -06:00
case DiscIO : : IVolume : : COUNTRY_JAPAN :
2009-08-23 15:20:08 -06:00
m_Country - > SetValue ( wxT ( " JAPAN " ) ) ;
2009-07-03 16:34:51 -06:00
break ;
case DiscIO : : IVolume : : COUNTRY_KOREA :
2009-08-23 15:20:08 -06:00
m_Country - > SetValue ( wxT ( " KOREA " ) ) ;
2009-07-03 16:34:51 -06:00
break ;
case DiscIO : : IVolume : : COUNTRY_TAIWAN :
2009-08-23 15:20:08 -06:00
m_Country - > SetValue ( wxT ( " TAIWAN " ) ) ;
2009-07-03 16:34:51 -06:00
break ;
case DiscIO : : IVolume : : COUNTRY_SDK :
2009-08-23 15:20:08 -06:00
m_Country - > SetValue ( wxT ( " No Country (SDK) " ) ) ;
2008-12-07 22:30:24 -07:00
break ;
default :
2009-08-23 15:20:08 -06:00
m_Country - > SetValue ( wxT ( " UNKNOWN " ) ) ;
2008-12-07 22:30:24 -07:00
break ;
}
wxString temp ;
temp = _T ( " 0x " ) + wxString : : FromAscii ( OpenISO - > GetMakerID ( ) . c_str ( ) ) ;
m_MakerID - > SetValue ( temp ) ;
2009-08-23 15:20:08 -06:00
m_Date - > SetValue ( wxString : : FromAscii ( OpenISO - > GetApploaderDate ( ) . c_str ( ) ) ) ;
2008-12-07 22:30:24 -07:00
m_FST - > SetValue ( wxString : : Format ( _T ( " %u " ) , OpenISO - > GetFSTSize ( ) ) ) ;
// Banner
2009-02-14 10:32:03 -07:00
ChangeBannerDetails ( ( int ) SConfig : : GetInstance ( ) . m_InterfaceLanguage ) ;
m_Banner - > SetBitmap ( OpenGameListItem - > GetImage ( ) ) ;
2008-12-07 22:30:24 -07:00
m_Banner - > Connect ( wxID_ANY , wxEVT_RIGHT_DOWN ,
wxMouseEventHandler ( CISOProperties : : RightClickOnBanner ) , ( wxObject * ) NULL , this ) ;
// Filesystem browser/dumper
2009-03-10 11:19:30 -06:00
if ( DiscIO : : IsVolumeWiiDisc ( OpenISO ) )
{
for ( u32 i = 0 ; i < WiiDisc . size ( ) ; i + + )
{
fileIter beginning = WiiDisc . at ( i ) . Files . begin ( ) , end = WiiDisc . at ( i ) . Files . end ( ) , pos = WiiDisc . at ( i ) . Files . begin ( ) ;
2009-03-10 14:33:30 -06:00
wxTreeItemId PartitionRoot = m_Treectrl - > AppendItem ( RootId , wxString : : Format ( wxT ( " Partition %i " ) , i ) , - 1 , - 1 , 0 ) ;
2009-03-10 11:19:30 -06:00
CreateDirectoryTree ( PartitionRoot , beginning , end , pos , ( char * ) " / " ) ;
if ( i = = 0 )
m_Treectrl - > Expand ( PartitionRoot ) ;
}
}
else
{
2009-06-06 20:54:07 -06:00
// TODO : Should we add a way to browse the wad file ?
if ( ! DiscIO : : IsVolumeWadFile ( OpenISO ) )
{
fileIter beginning = GCFiles . begin ( ) , end = GCFiles . end ( ) , pos = GCFiles . begin ( ) ;
CreateDirectoryTree ( RootId , beginning , end , pos , ( char * ) " / " ) ;
}
2009-03-10 11:19:30 -06:00
}
2008-12-07 22:30:24 -07:00
m_Treectrl - > Expand ( RootId ) ;
std : : string filename , extension ;
SplitPath ( fileName , 0 , & filename , & extension ) ;
2009-02-03 08:03:34 -07:00
// hyperiris: temp fix, need real work
2009-02-28 21:16:15 -07:00
wxString name ;
2009-08-07 02:52:04 -06:00
WxUtils : : CopySJISToString ( name , OpenGameListItem - > GetName ( 0 ) . c_str ( ) ) ;
2009-02-28 21:16:15 -07:00
2009-07-30 01:09:26 -06:00
SetTitle ( wxString : : Format ( wxT ( " %s%s " ) ,
2009-08-12 22:24:40 -06:00
wxString : : FromAscii ( StringFromFormat ( " %s%s: %s - " , filename . c_str ( ) , extension . c_str ( ) , OpenGameListItem - > GetUniqueID ( ) . c_str ( ) ) . c_str ( ) ) . c_str ( ) ,
2009-07-30 01:09:26 -06:00
name . c_str ( ) ) . c_str ( ) ) ;
2008-12-07 22:30:24 -07:00
}
CISOProperties : : ~ CISOProperties ( )
{
2009-03-24 17:58:32 -06:00
if ( IsVolumeWiiDisc ( OpenISO ) )
2009-08-01 11:51:17 -06:00
{
for ( std : : vector < WiiPartition > : : const_iterator PartIter = WiiDisc . begin ( ) ; PartIter ! = WiiDisc . end ( ) ; + + PartIter )
{
2009-08-03 19:58:16 -06:00
delete PartIter - > FileSystem ; // Remember the FileList is a member of DiscIO::IFileSystem
2009-08-01 11:51:17 -06:00
delete PartIter - > Partition ;
}
2009-08-03 19:58:16 -06:00
WiiDisc . clear ( ) ;
2009-08-01 11:51:17 -06:00
}
2009-03-24 17:58:32 -06:00
else
2009-06-06 20:54:07 -06:00
if ( ! IsVolumeWadFile ( OpenISO ) )
delete pFileSystem ;
2009-03-24 17:58:32 -06:00
delete OpenISO ;
2008-12-07 22:30:24 -07:00
}
void CISOProperties : : CreateDirectoryTree ( wxTreeItemId & parent ,
fileIter & begin ,
fileIter & end ,
fileIter & iterPos ,
char * directory )
{
bool bRoot = true ;
if ( iterPos = = begin )
+ + iterPos ;
else
bRoot = false ;
char * name = ( char * ) ( ( * iterPos ) - > m_FullPath ) ;
if ( iterPos = = end )
return ;
do
{
if ( ( * iterPos ) - > IsDirectory ( ) ) {
char * dirName ;
name [ strlen ( name ) - 1 ] = ' \0 ' ;
2009-03-03 03:21:13 -07:00
dirName = strrchr ( name , DIR_SEP_CHR ) ;
2008-12-07 22:30:24 -07:00
if ( ! dirName )
dirName = name ;
else
dirName + + ;
wxTreeItemId item = m_Treectrl - > AppendItem ( parent , wxString : : FromAscii ( dirName ) ) ;
CreateDirectoryTree ( item , begin , end , + + iterPos , name ) ;
} else {
2009-03-03 03:21:13 -07:00
char * fileName = strrchr ( name , DIR_SEP_CHR ) ;
2008-12-07 22:30:24 -07:00
if ( ! fileName )
fileName = name ;
else
fileName + + ;
m_Treectrl - > AppendItem ( parent , wxString : : FromAscii ( fileName ) ) ;
+ + iterPos ;
}
if ( iterPos = = end )
break ;
name = ( char * ) ( ( * iterPos ) - > m_FullPath ) ;
} while ( bRoot | | strstr ( name , directory ) ) ;
}
2009-06-06 20:54:07 -06:00
void CISOProperties : : CreateGUIControls ( bool IsWad )
2008-12-07 22:30:24 -07:00
{
m_Close = new wxButton ( this , ID_CLOSE , _ ( " Close " ) , wxDefaultPosition , wxDefaultSize , 0 , wxDefaultValidator ) ;
2009-06-06 20:54:07 -06:00
EditConfig = new wxButton ( this , ID_EDITCONFIG , _ ( " Edit Config " ) , wxDefaultPosition , wxDefaultSize ) ;
EditConfig - > SetToolTip ( _ ( " This will let you Manually Edit the INI config file " ) ) ;
2008-12-07 22:30:24 -07:00
// Notebook
m_Notebook = new wxNotebook ( this , ID_NOTEBOOK , wxDefaultPosition , wxDefaultSize ) ;
m_GameConfig = new wxPanel ( m_Notebook , ID_GAMECONFIG , wxDefaultPosition , wxDefaultSize ) ;
m_Notebook - > AddPage ( m_GameConfig , _ ( " GameConfig " ) ) ;
2009-03-24 17:10:43 -06:00
m_PatchPage = new wxPanel ( m_Notebook , ID_PATCH_PAGE , wxDefaultPosition , wxDefaultSize ) ;
m_Notebook - > AddPage ( m_PatchPage , _ ( " Patches " ) ) ;
m_CheatPage = new wxPanel ( m_Notebook , ID_ARCODE_PAGE , wxDefaultPosition , wxDefaultSize ) ;
m_Notebook - > AddPage ( m_CheatPage , _ ( " AR Codes " ) ) ;
2008-12-07 22:30:24 -07:00
m_Information = new wxPanel ( m_Notebook , ID_INFORMATION , wxDefaultPosition , wxDefaultSize ) ;
m_Notebook - > AddPage ( m_Information , _ ( " Info " ) ) ;
m_Filesystem = new wxPanel ( m_Notebook , ID_FILESYSTEM , wxDefaultPosition , wxDefaultSize ) ;
m_Notebook - > AddPage ( m_Filesystem , _ ( " Filesystem " ) ) ;
wxBoxSizer * sButtons ;
sButtons = new wxBoxSizer ( wxHORIZONTAL ) ;
2009-06-06 20:54:07 -06:00
sButtons - > Add ( EditConfig , 0 , wxALL , 5 ) ;
2008-12-07 22:30:24 -07:00
sButtons - > Add ( 0 , 0 , 1 , wxEXPAND , 5 ) ;
sButtons - > Add ( m_Close , 0 , wxALL , 5 ) ;
2009-02-14 10:32:03 -07:00
2008-12-07 22:30:24 -07:00
2009-09-02 15:00:45 -06:00
2009-03-24 17:10:43 -06:00
// GameConfig editing - Overrides and emulation state
sbGameConfig = new wxStaticBoxSizer ( wxVERTICAL , m_GameConfig , _ ( " Game-Specific Settings " ) ) ;
2009-05-06 12:07:28 -06:00
OverrideText = new wxStaticText ( m_GameConfig , ID_OVERRIDE_TEXT , _ ( " These settings override core Dolphin settings. \n Undetermined means the game uses Dolphin's setting. " ) , wxDefaultPosition , wxDefaultSize ) ;
2009-03-24 17:10:43 -06:00
// Core
sbCoreOverrides = new wxStaticBoxSizer ( wxVERTICAL , m_GameConfig , _ ( " Core " ) ) ;
2008-12-07 22:30:24 -07:00
UseDualCore = new wxCheckBox ( m_GameConfig , ID_USEDUALCORE , _ ( " Enable Dual Core " ) , wxDefaultPosition , wxDefaultSize , wxCHK_3STATE | wxCHK_ALLOW_3RD_STATE_FOR_USER , wxDefaultValidator ) ;
SkipIdle = new wxCheckBox ( m_GameConfig , ID_IDLESKIP , _ ( " Enable Idle Skipping " ) , wxDefaultPosition , wxDefaultSize , wxCHK_3STATE | wxCHK_ALLOW_3RD_STATE_FOR_USER , wxDefaultValidator ) ;
OptimizeQuantizers = new wxCheckBox ( m_GameConfig , ID_OPTIMIZEQUANTIZERS , _ ( " Optimize Quantizers " ) , wxDefaultPosition , wxDefaultSize , wxCHK_3STATE | wxCHK_ALLOW_3RD_STATE_FOR_USER , wxDefaultValidator ) ;
2009-03-04 09:56:49 -07:00
TLBHack = new wxCheckBox ( m_GameConfig , ID_TLBHACK , _ ( " TLB Hack " ) , wxDefaultPosition , wxDefaultSize , wxCHK_3STATE | wxCHK_ALLOW_3RD_STATE_FOR_USER , wxDefaultValidator ) ;
2009-03-24 17:10:43 -06:00
// Wii Console
sbWiiOverrides = new wxStaticBoxSizer ( wxVERTICAL , m_GameConfig , _ ( " Wii Console " ) ) ;
EnableProgressiveScan = new wxCheckBox ( m_GameConfig , ID_ENABLEPROGRESSIVESCAN , _ ( " Enable Progressive Scan " ) , wxDefaultPosition , wxDefaultSize , wxCHK_3STATE | wxCHK_ALLOW_3RD_STATE_FOR_USER , wxDefaultValidator ) ;
EnableWideScreen = new wxCheckBox ( m_GameConfig , ID_ENABLEWIDESCREEN , _ ( " Enable WideScreen " ) , wxDefaultPosition , wxDefaultSize , wxCHK_3STATE | wxCHK_ALLOW_3RD_STATE_FOR_USER , wxDefaultValidator ) ;
2009-06-06 20:54:07 -06:00
if ( ! DiscIO : : IsVolumeWiiDisc ( OpenISO ) & & ! DiscIO : : IsVolumeWadFile ( OpenISO ) )
2009-03-24 17:10:43 -06:00
{
sbWiiOverrides - > ShowItems ( false ) ;
EnableProgressiveScan - > Hide ( ) ;
EnableWideScreen - > Hide ( ) ;
}
// Video
sbVideoOverrides = new wxStaticBoxSizer ( wxVERTICAL , m_GameConfig , _ ( " Video " ) ) ;
2009-03-22 15:24:38 -06:00
ForceFiltering = new wxCheckBox ( m_GameConfig , ID_FORCEFILTERING , _ ( " Force Filtering " ) , wxDefaultPosition , wxDefaultSize , wxCHK_3STATE | wxCHK_ALLOW_3RD_STATE_FOR_USER , wxDefaultValidator ) ;
EFBCopyDisable = new wxCheckBox ( m_GameConfig , ID_EFBCOPYDISABLE , _ ( " Disable Copy to EFB " ) , wxDefaultPosition , wxDefaultSize , wxCHK_3STATE | wxCHK_ALLOW_3RD_STATE_FOR_USER , wxDefaultValidator ) ;
2009-08-25 12:30:15 -06:00
EFBToTextureEnable = new wxCheckBox ( m_GameConfig , ID_EFBTOTEXTUREENABLE , _ ( " Enable EFB To RAM " ) , wxDefaultPosition , wxDefaultSize , wxCHK_3STATE | wxCHK_ALLOW_3RD_STATE_FOR_USER , wxDefaultValidator ) ;
2009-03-22 15:24:38 -06:00
SafeTextureCache = new wxCheckBox ( m_GameConfig , ID_SAFETEXTURECACHE , _ ( " Safe Texture Cache " ) , wxDefaultPosition , wxDefaultSize , wxCHK_3STATE | wxCHK_ALLOW_3RD_STATE_FOR_USER , wxDefaultValidator ) ;
DstAlphaPass = new wxCheckBox ( m_GameConfig , ID_DSTALPHAPASS , _ ( " Distance Alpha Pass " ) , wxDefaultPosition , wxDefaultSize , wxCHK_3STATE | wxCHK_ALLOW_3RD_STATE_FOR_USER , wxDefaultValidator ) ;
UseXFB = new wxCheckBox ( m_GameConfig , ID_USEXFB , _ ( " Use XFB " ) , wxDefaultPosition , wxDefaultSize , wxCHK_3STATE | wxCHK_ALLOW_3RD_STATE_FOR_USER , wxDefaultValidator ) ;
2009-05-11 15:20:27 -06:00
// Hack
2009-05-13 07:28:49 -06:00
Hacktext = new wxStaticText ( m_GameConfig , ID_HACK_TEXT , _ ( " Projection Hack for: " ) , wxDefaultPosition , wxDefaultSize ) ;
2009-05-11 15:20:27 -06:00
arrayStringFor_Hack . Add ( _ ( " None " ) ) ;
2009-05-13 07:28:49 -06:00
arrayStringFor_Hack . Add ( _ ( " Zelda Twilight Princess Bloom hack " ) ) ;
2009-05-11 15:20:27 -06:00
arrayStringFor_Hack . Add ( _ ( " Sonic and the Black Knight " ) ) ;
arrayStringFor_Hack . Add ( _ ( " Bleach Versus Crusade " ) ) ;
arrayStringFor_Hack . Add ( _ ( " Final Fantasy CC Echo of Time " ) ) ;
2009-06-09 08:24:20 -06:00
arrayStringFor_Hack . Add ( _ ( " Harvest Moon Magical Melody " ) ) ;
arrayStringFor_Hack . Add ( _ ( " Baten Kaitos " ) ) ;
arrayStringFor_Hack . Add ( _ ( " Baten Kaitos Origin " ) ) ;
2009-06-09 19:26:42 -06:00
arrayStringFor_Hack . Add ( _ ( " Skies of Arcadia " ) ) ;
2009-05-11 15:20:27 -06:00
Hack = new wxChoice ( m_GameConfig , ID_HACK , wxDefaultPosition , wxDefaultSize , arrayStringFor_Hack , 0 , wxDefaultValidator ) ;
2009-05-13 07:28:49 -06:00
2009-05-11 15:20:27 -06:00
2009-05-10 06:33:47 -06:00
//HLE Audio
sbHLEaudioOverrides = new wxStaticBoxSizer ( wxVERTICAL , m_GameConfig , _ ( " HLE Audio " ) ) ;
UseRE0Fix = new wxCheckBox ( m_GameConfig , ID_RE0FIX , _ ( " Use RE0 Fix " ) , wxDefaultPosition , wxDefaultSize , wxCHK_3STATE | wxCHK_ALLOW_3RD_STATE_FOR_USER , wxDefaultValidator ) ;
2009-06-06 20:54:07 -06:00
2009-03-24 17:10:43 -06:00
// Emulation State
2009-06-06 20:54:07 -06:00
sEmuState = new wxBoxSizer ( wxHORIZONTAL ) ;
2009-03-24 17:10:43 -06:00
EmuStateText = new wxStaticText ( m_GameConfig , ID_EMUSTATE_TEXT , _ ( " Emulation State: " ) , wxDefaultPosition , wxDefaultSize ) ;
2008-12-07 22:30:24 -07:00
arrayStringFor_EmuState . Add ( _ ( " Not Set " ) ) ;
arrayStringFor_EmuState . Add ( _ ( " Broken " ) ) ;
2009-02-21 07:40:34 -07:00
arrayStringFor_EmuState . Add ( _ ( " Problems: " ) ) ;
2008-12-07 22:30:24 -07:00
arrayStringFor_EmuState . Add ( _ ( " Intro " ) ) ;
arrayStringFor_EmuState . Add ( _ ( " In Game " ) ) ;
arrayStringFor_EmuState . Add ( _ ( " Perfect " ) ) ;
EmuState = new wxChoice ( m_GameConfig , ID_EMUSTATE , wxDefaultPosition , wxDefaultSize , arrayStringFor_EmuState , 0 , wxDefaultValidator ) ;
2009-03-24 17:10:43 -06:00
EmuIssues = new wxTextCtrl ( m_GameConfig , ID_EMU_ISSUES , wxEmptyString , wxDefaultPosition , wxDefaultSize , 0 , wxDefaultValidator ) ;
2008-12-07 22:30:24 -07:00
2009-03-24 17:10:43 -06:00
wxBoxSizer * sConfigPage ;
sConfigPage = new wxBoxSizer ( wxVERTICAL ) ;
sbGameConfig - > Add ( OverrideText , 0 , wxEXPAND | wxALL , 5 ) ;
sbCoreOverrides - > Add ( UseDualCore , 0 , wxEXPAND | wxLEFT , 5 ) ;
sbCoreOverrides - > Add ( SkipIdle , 0 , wxEXPAND | wxLEFT , 5 ) ;
sbCoreOverrides - > Add ( TLBHack , 0 , wxEXPAND | wxLEFT , 5 ) ;
sbCoreOverrides - > Add ( OptimizeQuantizers , 0 , wxEXPAND | wxLEFT , 5 ) ;
sbWiiOverrides - > Add ( EnableProgressiveScan , 0 , wxEXPAND | wxLEFT , 5 ) ;
sbWiiOverrides - > Add ( EnableWideScreen , 0 , wxEXPAND | wxLEFT , 5 ) ;
sbVideoOverrides - > Add ( ForceFiltering , 0 , wxEXPAND | wxLEFT , 5 ) ;
sbVideoOverrides - > Add ( EFBCopyDisable , 0 , wxEXPAND | wxLEFT , 5 ) ;
sbVideoOverrides - > Add ( EFBToTextureEnable , 0 , wxEXPAND | wxLEFT , 5 ) ;
sbVideoOverrides - > Add ( SafeTextureCache , 0 , wxEXPAND | wxLEFT , 5 ) ;
sbVideoOverrides - > Add ( DstAlphaPass , 0 , wxEXPAND | wxLEFT , 5 ) ;
sbVideoOverrides - > Add ( UseXFB , 0 , wxEXPAND | wxLEFT , 5 ) ;
2009-05-11 15:20:27 -06:00
sbVideoOverrides - > Add ( Hacktext , 0 , wxEXPAND | wxLEFT , 5 ) ;
sbVideoOverrides - > Add ( Hack , 0 , wxEXPAND | wxLEFT , 5 ) ;
2009-05-10 06:33:47 -06:00
sbHLEaudioOverrides - > Add ( UseRE0Fix , 0 , wxEXPAND | wxLEFT , 5 ) ;
2009-03-24 17:10:43 -06:00
sbGameConfig - > Add ( sbCoreOverrides , 0 , wxEXPAND ) ;
sbGameConfig - > Add ( sbWiiOverrides , 0 , wxEXPAND ) ;
sbGameConfig - > Add ( sbVideoOverrides , 0 , wxEXPAND ) ;
2009-05-10 06:33:47 -06:00
sbGameConfig - > Add ( sbHLEaudioOverrides , 0 , wxEXPAND ) ;
2009-03-24 17:10:43 -06:00
sConfigPage - > Add ( sbGameConfig , 0 , wxEXPAND | wxALL , 5 ) ;
sEmuState - > Add ( EmuStateText , 0 , wxALIGN_CENTER_VERTICAL ) ;
sEmuState - > Add ( EmuState , 0 , wxEXPAND ) ;
sEmuState - > Add ( EmuIssues , 1 , wxEXPAND ) ;
sConfigPage - > Add ( sEmuState , 0 , wxEXPAND | wxALL , 5 ) ;
m_GameConfig - > SetSizer ( sConfigPage ) ;
sConfigPage - > Layout ( ) ;
2009-09-02 15:00:45 -06:00
2008-12-07 22:30:24 -07:00
// Patches
sPatches = new wxBoxSizer ( wxVERTICAL ) ;
Patches = new wxCheckListBox ( m_PatchPage , ID_PATCHES_LIST , wxDefaultPosition , wxDefaultSize , arrayStringFor_Patches , wxLB_HSCROLL , wxDefaultValidator ) ;
sPatchButtons = new wxBoxSizer ( wxHORIZONTAL ) ;
EditPatch = new wxButton ( m_PatchPage , ID_EDITPATCH , _ ( " Edit... " ) , wxDefaultPosition , wxDefaultSize , 0 ) ;
AddPatch = new wxButton ( m_PatchPage , ID_ADDPATCH , _ ( " Add... " ) , wxDefaultPosition , wxDefaultSize , 0 ) ;
RemovePatch = new wxButton ( m_PatchPage , ID_REMOVEPATCH , _ ( " Remove " ) , wxDefaultPosition , wxDefaultSize , 0 ) ;
EditPatch - > Enable ( false ) ;
RemovePatch - > Enable ( false ) ;
wxBoxSizer * sPatchPage ;
sPatchPage = new wxBoxSizer ( wxVERTICAL ) ;
sPatches - > Add ( Patches , 1 , wxEXPAND | wxALL , 0 ) ;
sPatchButtons - > Add ( EditPatch , 0 , wxEXPAND | wxALL , 0 ) ;
sPatchButtons - > AddStretchSpacer ( ) ;
sPatchButtons - > Add ( AddPatch , 0 , wxEXPAND | wxALL , 0 ) ;
sPatchButtons - > Add ( RemovePatch , 0 , wxEXPAND | wxALL , 0 ) ;
sPatches - > Add ( sPatchButtons , 0 , wxEXPAND | wxALL , 0 ) ;
2009-03-24 17:10:43 -06:00
sPatchPage - > Add ( sPatches , 1 , wxEXPAND | wxALL , 5 ) ;
2008-12-07 22:30:24 -07:00
m_PatchPage - > SetSizer ( sPatchPage ) ;
sPatchPage - > Layout ( ) ;
2009-09-02 15:00:45 -06:00
2009-03-24 17:10:43 -06:00
// Action Replay Cheats
sCheats = new wxBoxSizer ( wxVERTICAL ) ;
Cheats = new wxCheckListBox ( m_CheatPage , ID_CHEATS_LIST , wxDefaultPosition , wxDefaultSize , arrayStringFor_Cheats , wxLB_HSCROLL , wxDefaultValidator ) ;
sCheatButtons = new wxBoxSizer ( wxHORIZONTAL ) ;
EditCheat = new wxButton ( m_CheatPage , ID_EDITCHEAT , _ ( " Edit... " ) , wxDefaultPosition , wxDefaultSize , 0 ) ;
AddCheat = new wxButton ( m_CheatPage , ID_ADDCHEAT , _ ( " Add... " ) , wxDefaultPosition , wxDefaultSize , 0 ) ;
RemoveCheat = new wxButton ( m_CheatPage , ID_REMOVECHEAT , _ ( " Remove " ) , wxDefaultPosition , wxDefaultSize , 0 ) ;
EditCheat - > Enable ( false ) ;
RemoveCheat - > Enable ( false ) ;
2008-12-07 22:30:24 -07:00
wxBoxSizer * sCheatPage ;
sCheatPage = new wxBoxSizer ( wxVERTICAL ) ;
sCheats - > Add ( Cheats , 1 , wxEXPAND | wxALL , 0 ) ;
sCheatButtons - > Add ( EditCheat , 0 , wxEXPAND | wxALL , 0 ) ;
sCheatButtons - > AddStretchSpacer ( ) ;
sCheatButtons - > Add ( AddCheat , 0 , wxEXPAND | wxALL , 0 ) ;
sCheatButtons - > Add ( RemoveCheat , 0 , wxEXPAND | wxALL , 0 ) ;
sCheats - > Add ( sCheatButtons , 0 , wxEXPAND | wxALL , 0 ) ;
2009-03-24 17:10:43 -06:00
sCheatPage - > Add ( sCheats , 1 , wxEXPAND | wxALL , 5 ) ;
2008-12-07 22:30:24 -07:00
m_CheatPage - > SetSizer ( sCheatPage ) ;
sCheatPage - > Layout ( ) ;
2009-09-02 15:00:45 -06:00
2008-12-07 22:30:24 -07:00
// ISO Details
sbISODetails = new wxStaticBoxSizer ( wxVERTICAL , m_Information , _ ( " ISO Details " ) ) ;
sISODetails = new wxGridBagSizer ( 0 , 0 ) ;
sISODetails - > AddGrowableCol ( 1 ) ;
m_NameText = new wxStaticText ( m_Information , ID_NAME_TEXT , _ ( " Name: " ) , wxDefaultPosition , wxDefaultSize ) ;
m_Name = new wxTextCtrl ( m_Information , ID_NAME , wxEmptyString , wxDefaultPosition , wxDefaultSize , wxTE_READONLY ) ;
m_GameIDText = new wxStaticText ( m_Information , ID_GAMEID_TEXT , _ ( " Game ID: " ) , wxDefaultPosition , wxDefaultSize ) ;
m_GameID = new wxTextCtrl ( m_Information , ID_GAMEID , wxEmptyString , wxDefaultPosition , wxDefaultSize , wxTE_READONLY ) ;
m_CountryText = new wxStaticText ( m_Information , ID_COUNTRY_TEXT , _ ( " Country: " ) , wxDefaultPosition , wxDefaultSize ) ;
m_Country = new wxTextCtrl ( m_Information , ID_COUNTRY , wxEmptyString , wxDefaultPosition , wxDefaultSize , wxTE_READONLY ) ;
m_MakerIDText = new wxStaticText ( m_Information , ID_MAKERID_TEXT , _ ( " Maker ID: " ) , wxDefaultPosition , wxDefaultSize ) ;
m_MakerID = new wxTextCtrl ( m_Information , ID_MAKERID , wxEmptyString , wxDefaultPosition , wxDefaultSize , wxTE_READONLY ) ;
m_DateText = new wxStaticText ( m_Information , ID_DATE_TEXT , _ ( " Date: " ) , wxDefaultPosition , wxDefaultSize ) ;
m_Date = new wxTextCtrl ( m_Information , ID_DATE , wxEmptyString , wxDefaultPosition , wxDefaultSize , wxTE_READONLY ) ;
m_FSTText = new wxStaticText ( m_Information , ID_FST_TEXT , _ ( " FST Size: " ) , wxDefaultPosition , wxDefaultSize ) ;
m_FST = new wxTextCtrl ( m_Information , ID_FST , wxEmptyString , wxDefaultPosition , wxDefaultSize , wxTE_READONLY ) ;
// Banner Details
sbBannerDetails = new wxStaticBoxSizer ( wxVERTICAL , m_Information , _ ( " Banner Details " ) ) ;
sBannerDetails = new wxGridBagSizer ( 0 , 0 ) ;
sBannerDetails - > AddGrowableCol ( 1 ) ; sBannerDetails - > AddGrowableCol ( 2 ) ; sBannerDetails - > AddGrowableCol ( 3 ) ;
m_LangText = new wxStaticText ( m_Information , ID_LANG_TEXT , _ ( " Show Language: " ) , wxDefaultPosition , wxDefaultSize ) ;
arrayStringFor_Lang . Add ( _ ( " English " ) ) ;
arrayStringFor_Lang . Add ( _ ( " German " ) ) ;
arrayStringFor_Lang . Add ( _ ( " French " ) ) ;
arrayStringFor_Lang . Add ( _ ( " Spanish " ) ) ;
arrayStringFor_Lang . Add ( _ ( " Italian " ) ) ;
arrayStringFor_Lang . Add ( _ ( " Dutch " ) ) ;
m_Lang = new wxChoice ( m_Information , ID_LANG , wxDefaultPosition , wxDefaultSize , arrayStringFor_Lang , 0 , wxDefaultValidator ) ;
2009-02-14 10:32:03 -07:00
m_Lang - > SetSelection ( ( int ) SConfig : : GetInstance ( ) . m_InterfaceLanguage ) ;
2008-12-07 22:30:24 -07:00
m_ShortText = new wxStaticText ( m_Information , ID_SHORTNAME_TEXT , _ ( " Short Name: " ) , wxDefaultPosition , wxDefaultSize ) ;
m_ShortName = new wxTextCtrl ( m_Information , ID_SHORTNAME , wxEmptyString , wxDefaultPosition , wxDefaultSize , wxTE_READONLY ) ;
m_MakerText = new wxStaticText ( m_Information , ID_MAKER_TEXT , _ ( " Maker: " ) , wxDefaultPosition , wxDefaultSize ) ;
m_Maker = new wxTextCtrl ( m_Information , ID_MAKER , wxEmptyString , wxDefaultPosition , wxDefaultSize , wxTE_READONLY ) ;
m_CommentText = new wxStaticText ( m_Information , ID_COMMENT_TEXT , _ ( " Comment: " ) , wxDefaultPosition , wxDefaultSize ) ;
m_Comment = new wxTextCtrl ( m_Information , ID_COMMENT , wxEmptyString , wxDefaultPosition , wxDefaultSize , wxTE_MULTILINE | wxTE_READONLY ) ;
m_BannerText = new wxStaticText ( m_Information , ID_BANNER_TEXT , _ ( " Banner: " ) , wxDefaultPosition , wxDefaultSize ) ;
m_Banner = new wxStaticBitmap ( m_Information , ID_BANNER , wxNullBitmap , wxDefaultPosition , wxSize ( 96 , 32 ) , 0 ) ;
wxBoxSizer * sInfoPage ;
sInfoPage = new wxBoxSizer ( wxVERTICAL ) ;
sISODetails - > Add ( m_NameText , wxGBPosition ( 0 , 0 ) , wxGBSpan ( 1 , 1 ) , wxALIGN_CENTER_VERTICAL | wxALL , 5 ) ;
sISODetails - > Add ( m_Name , wxGBPosition ( 0 , 1 ) , wxGBSpan ( 1 , 1 ) , wxEXPAND | wxALL , 5 ) ;
sISODetails - > Add ( m_GameIDText , wxGBPosition ( 1 , 0 ) , wxGBSpan ( 1 , 1 ) , wxALIGN_CENTER_VERTICAL | wxALL , 5 ) ;
sISODetails - > Add ( m_GameID , wxGBPosition ( 1 , 1 ) , wxGBSpan ( 1 , 1 ) , wxEXPAND | wxALL , 5 ) ;
sISODetails - > Add ( m_CountryText , wxGBPosition ( 2 , 0 ) , wxGBSpan ( 1 , 1 ) , wxALIGN_CENTER_VERTICAL | wxALL , 5 ) ;
sISODetails - > Add ( m_Country , wxGBPosition ( 2 , 1 ) , wxGBSpan ( 1 , 1 ) , wxEXPAND | wxALL , 5 ) ;
sISODetails - > Add ( m_MakerIDText , wxGBPosition ( 3 , 0 ) , wxGBSpan ( 1 , 1 ) , wxALIGN_CENTER_VERTICAL | wxALL , 5 ) ;
sISODetails - > Add ( m_MakerID , wxGBPosition ( 3 , 1 ) , wxGBSpan ( 1 , 1 ) , wxEXPAND | wxALL , 5 ) ;
sISODetails - > Add ( m_DateText , wxGBPosition ( 4 , 0 ) , wxGBSpan ( 1 , 1 ) , wxALIGN_CENTER_VERTICAL | wxALL , 5 ) ;
sISODetails - > Add ( m_Date , wxGBPosition ( 4 , 1 ) , wxGBSpan ( 1 , 1 ) , wxEXPAND | wxALL , 5 ) ;
sISODetails - > Add ( m_FSTText , wxGBPosition ( 5 , 0 ) , wxGBSpan ( 1 , 1 ) , wxALIGN_CENTER_VERTICAL | wxALL , 5 ) ;
sISODetails - > Add ( m_FST , wxGBPosition ( 5 , 1 ) , wxGBSpan ( 1 , 1 ) , wxEXPAND | wxALL , 5 ) ;
sbISODetails - > Add ( sISODetails , 0 , wxEXPAND , 5 ) ;
2009-02-14 10:32:03 -07:00
sBannerDetails - > Add ( m_LangText , wxGBPosition ( 0 , 0 ) , wxGBSpan ( 1 , 1 ) , wxALIGN_CENTER_VERTICAL | wxALL , 5 ) ;
sBannerDetails - > Add ( m_Lang , wxGBPosition ( 0 , 1 ) , wxGBSpan ( 1 , 1 ) , wxEXPAND | wxALL , 5 ) ;
2008-12-07 22:30:24 -07:00
sBannerDetails - > Add ( m_ShortText , wxGBPosition ( 1 , 0 ) , wxGBSpan ( 1 , 1 ) , wxALIGN_CENTER_VERTICAL | wxALL , 5 ) ;
2009-02-14 10:32:03 -07:00
sBannerDetails - > Add ( m_ShortName , wxGBPosition ( 1 , 1 ) , wxGBSpan ( 1 , 1 ) , wxEXPAND | wxALL , 5 ) ;
sBannerDetails - > Add ( m_MakerText , wxGBPosition ( 2 , 0 ) , wxGBSpan ( 1 , 1 ) , wxALIGN_CENTER_VERTICAL | wxALL , 5 ) ;
sBannerDetails - > Add ( m_Maker , wxGBPosition ( 2 , 1 ) , wxGBSpan ( 1 , 1 ) , wxEXPAND | wxALL , 5 ) ;
sBannerDetails - > Add ( m_CommentText , wxGBPosition ( 3 , 0 ) , wxGBSpan ( 1 , 1 ) , wxALL , 5 ) ;
sBannerDetails - > Add ( m_Comment , wxGBPosition ( 3 , 1 ) , wxGBSpan ( 1 , 1 ) , wxEXPAND | wxALL , 5 ) ;
sBannerDetails - > Add ( m_BannerText , wxGBPosition ( 4 , 0 ) , wxGBSpan ( 1 , 1 ) , wxALL , 5 ) ;
sBannerDetails - > Add ( m_Banner , wxGBPosition ( 4 , 1 ) , wxGBSpan ( 1 , 1 ) , wxEXPAND | wxALL , 5 ) ;
2008-12-07 22:30:24 -07:00
sbBannerDetails - > Add ( sBannerDetails , 0 , wxEXPAND , 0 ) ;
sInfoPage - > Add ( sbISODetails , 0 , wxEXPAND | wxALL , 5 ) ;
sInfoPage - > Add ( sbBannerDetails , 0 , wxEXPAND | wxALL , 5 ) ;
m_Information - > SetSizer ( sInfoPage ) ;
sInfoPage - > Layout ( ) ;
2009-03-24 17:10:43 -06:00
2009-09-02 15:00:45 -06:00
2008-12-07 22:30:24 -07:00
// Filesystem tree
m_Treectrl = new wxTreeCtrl ( m_Filesystem , ID_TREECTRL , wxDefaultPosition , wxDefaultSize , wxTR_DEFAULT_STYLE , wxDefaultValidator ) ;
2009-03-10 11:19:30 -06:00
RootId = m_Treectrl - > AddRoot ( wxT ( " Disc " ) , - 1 , - 1 , 0 ) ;
2008-12-07 22:30:24 -07:00
wxBoxSizer * sTreePage ;
sTreePage = new wxBoxSizer ( wxVERTICAL ) ;
2009-03-24 17:10:43 -06:00
sTreePage - > Add ( m_Treectrl , 1 , wxEXPAND | wxALL , 5 ) ;
2008-12-07 22:30:24 -07:00
m_Filesystem - > SetSizer ( sTreePage ) ;
sTreePage - > Layout ( ) ;
2009-06-06 20:54:07 -06:00
// It's a wad file, so we remove the FileSystem page
if ( IsWad )
m_Notebook - > RemovePage ( 4 ) ;
2009-09-02 15:00:45 -06:00
2009-03-24 17:10:43 -06:00
// Add notebook and buttons to the dialog
2009-02-14 10:32:03 -07:00
wxBoxSizer * sMain ;
sMain = new wxBoxSizer ( wxVERTICAL ) ;
sMain - > Add ( m_Notebook , 1 , wxEXPAND | wxALL , 5 ) ;
sMain - > Add ( sButtons , 0 , wxEXPAND , 5 ) ;
2009-06-06 20:54:07 -06:00
sMain - > SetMinSize ( wxSize ( 400 , 500 ) ) ;
2009-02-14 10:32:03 -07:00
SetSizerAndFit ( sMain ) ;
2008-12-07 22:30:24 -07:00
}
void CISOProperties : : OnClose ( wxCloseEvent & WXUNUSED ( event ) )
{
if ( ! SaveGameConfig ( ) )
2009-09-02 01:59:06 -06:00
PanicYesNo ( " Could not save %s " , GameIniFile . c_str ( ) ) ;
2008-12-07 22:30:24 -07:00
2009-01-28 03:21:18 -07:00
EndModal ( bRefreshList ? wxID_OK : wxID_CANCEL ) ;
2008-12-07 22:30:24 -07:00
}
void CISOProperties : : OnCloseClick ( wxCommandEvent & WXUNUSED ( event ) )
{
Close ( ) ;
}
void CISOProperties : : RightClickOnBanner ( wxMouseEvent & event )
{
wxMenu popupMenu ;
popupMenu . Append ( IDM_BNRSAVEAS , _ ( " Save as... " ) ) ;
PopupMenu ( & popupMenu ) ;
event . Skip ( ) ;
}
void CISOProperties : : OnBannerImageSave ( wxCommandEvent & WXUNUSED ( event ) )
{
wxString dirHome ;
wxFileDialog dialog ( this , _ ( " Save as... " ) , wxGetHomeDir ( & dirHome ) , wxString : : Format ( _ ( " %s.png " ) , m_GameID - > GetLabel ( ) . c_str ( ) ) ,
_ ( " *.* " ) , wxFD_SAVE | wxFD_OVERWRITE_PROMPT , wxDefaultPosition , wxDefaultSize ) ;
if ( dialog . ShowModal ( ) = = wxID_OK )
{
m_Banner - > GetBitmap ( ) . ConvertToImage ( ) . SaveFile ( dialog . GetPath ( ) ) ;
}
}
void CISOProperties : : OnRightClickOnTree ( wxTreeEvent & event )
{
m_Treectrl - > SelectItem ( event . GetItem ( ) ) ;
wxMenu popupMenu ;
if ( m_Treectrl - > ItemHasChildren ( m_Treectrl - > GetSelection ( ) ) )
; //popupMenu.Append(IDM_EXTRACTDIR, _("Extract Directory..."));
else
popupMenu . Append ( IDM_EXTRACTFILE , _ ( " Extract File... " ) ) ;
PopupMenu ( & popupMenu ) ;
event . Skip ( ) ;
}
void CISOProperties : : OnExtractFile ( wxCommandEvent & WXUNUSED ( event ) )
{
wxString Path ;
wxString File ;
File = m_Treectrl - > GetItemText ( m_Treectrl - > GetSelection ( ) ) ;
Path = wxFileSelector (
2009-03-10 11:19:30 -06:00
wxT ( " Export File " ) ,
2008-12-07 22:30:24 -07:00
wxEmptyString , File , wxEmptyString ,
wxString : : Format
(
2009-03-10 11:19:30 -06:00
wxT ( " All files (%s)|%s " ) ,
2008-12-07 22:30:24 -07:00
wxFileSelectorDefaultWildcardStr ,
wxFileSelectorDefaultWildcardStr
) ,
wxFD_SAVE ,
this ) ;
if ( ! Path | | ! File )
return ;
while ( m_Treectrl - > GetItemParent ( m_Treectrl - > GetSelection ( ) ) ! = m_Treectrl - > GetRootItem ( ) )
{
wxString temp ;
temp = m_Treectrl - > GetItemText ( m_Treectrl - > GetItemParent ( m_Treectrl - > GetSelection ( ) ) ) ;
2009-03-10 11:19:30 -06:00
File = temp + wxT ( DIR_SEP_CHR ) + File ;
2008-12-07 22:30:24 -07:00
m_Treectrl - > SelectItem ( m_Treectrl - > GetItemParent ( m_Treectrl - > GetSelection ( ) ) ) ;
}
2009-03-10 11:19:30 -06:00
if ( DiscIO : : IsVolumeWiiDisc ( OpenISO ) )
{
int partitionNum = wxAtoi ( File . SubString ( 10 , 11 ) ) ;
File . Remove ( 0 , 12 ) ; // Remove "Partition x/"
WiiDisc . at ( partitionNum ) . FileSystem - > ExportFile ( File . mb_str ( ) , Path . mb_str ( ) ) ;
}
else
pFileSystem - > ExportFile ( File . mb_str ( ) , Path . mb_str ( ) ) ;
2008-12-07 22:30:24 -07:00
}
void CISOProperties : : OnExtractDir ( wxCommandEvent & WXUNUSED ( event ) )
{
}
2009-03-24 17:10:43 -06:00
void CISOProperties : : SetRefresh ( wxCommandEvent & event )
2008-12-07 22:30:24 -07:00
{
2009-03-24 17:10:43 -06:00
bRefreshList = true ;
if ( event . GetId ( ) = = ID_EMUSTATE )
EmuIssues - > Enable ( event . GetSelection ( ) = = 2 ) ;
2008-12-07 22:30:24 -07:00
}
void CISOProperties : : LoadGameConfig ( )
{
bool bTemp ;
int iTemp ;
2009-02-21 07:40:34 -07:00
std : : string sTemp ;
2008-12-07 22:30:24 -07:00
if ( GameIni . Get ( " Core " , " UseDualCore " , & bTemp ) )
UseDualCore - > Set3StateValue ( ( wxCheckBoxState ) bTemp ) ;
else
UseDualCore - > Set3StateValue ( wxCHK_UNDETERMINED ) ;
if ( GameIni . Get ( " Core " , " SkipIdle " , & bTemp ) )
SkipIdle - > Set3StateValue ( ( wxCheckBoxState ) bTemp ) ;
else
SkipIdle - > Set3StateValue ( wxCHK_UNDETERMINED ) ;
if ( GameIni . Get ( " Core " , " OptimizeQuantizers " , & bTemp ) )
OptimizeQuantizers - > Set3StateValue ( ( wxCheckBoxState ) bTemp ) ;
else
OptimizeQuantizers - > Set3StateValue ( wxCHK_UNDETERMINED ) ;
2009-03-04 09:56:49 -07:00
if ( GameIni . Get ( " Core " , " TLBHack " , & bTemp ) )
TLBHack - > Set3StateValue ( ( wxCheckBoxState ) bTemp ) ;
else
TLBHack - > Set3StateValue ( wxCHK_UNDETERMINED ) ;
2008-12-07 22:30:24 -07:00
2009-03-24 17:10:43 -06:00
if ( GameIni . Get ( " Wii " , " ProgressiveScan " , & bTemp ) )
EnableProgressiveScan - > Set3StateValue ( ( wxCheckBoxState ) bTemp ) ;
else
EnableProgressiveScan - > Set3StateValue ( wxCHK_UNDETERMINED ) ;
if ( GameIni . Get ( " Wii " , " Widescreen " , & bTemp ) )
EnableWideScreen - > Set3StateValue ( ( wxCheckBoxState ) bTemp ) ;
else
EnableWideScreen - > Set3StateValue ( wxCHK_UNDETERMINED ) ;
2009-03-22 15:24:38 -06:00
if ( GameIni . Get ( " Video " , " ForceFiltering " , & bTemp ) )
ForceFiltering - > Set3StateValue ( ( wxCheckBoxState ) bTemp ) ;
else
ForceFiltering - > Set3StateValue ( wxCHK_UNDETERMINED ) ;
if ( GameIni . Get ( " Video " , " EFBCopyDisable " , & bTemp ) )
EFBCopyDisable - > Set3StateValue ( ( wxCheckBoxState ) bTemp ) ;
else
EFBCopyDisable - > Set3StateValue ( wxCHK_UNDETERMINED ) ;
if ( GameIni . Get ( " Video " , " EFBToTextureEnable " , & bTemp ) )
EFBToTextureEnable - > Set3StateValue ( ( wxCheckBoxState ) bTemp ) ;
else
EFBToTextureEnable - > Set3StateValue ( wxCHK_UNDETERMINED ) ;
if ( GameIni . Get ( " Video " , " SafeTextureCache " , & bTemp ) )
SafeTextureCache - > Set3StateValue ( ( wxCheckBoxState ) bTemp ) ;
else
SafeTextureCache - > Set3StateValue ( wxCHK_UNDETERMINED ) ;
if ( GameIni . Get ( " Video " , " DstAlphaPass " , & bTemp ) )
DstAlphaPass - > Set3StateValue ( ( wxCheckBoxState ) bTemp ) ;
else
DstAlphaPass - > Set3StateValue ( wxCHK_UNDETERMINED ) ;
if ( GameIni . Get ( " Video " , " UseXFB " , & bTemp ) )
UseXFB - > Set3StateValue ( ( wxCheckBoxState ) bTemp ) ;
else
UseXFB - > Set3StateValue ( wxCHK_UNDETERMINED ) ;
2009-05-10 06:54:05 -06:00
if ( GameIni . Get ( " HLEaudio " , " UseRE0Fix " , & bTemp ) )
2009-05-10 06:33:47 -06:00
UseRE0Fix - > Set3StateValue ( ( wxCheckBoxState ) bTemp ) ;
else
UseRE0Fix - > Set3StateValue ( wxCHK_UNDETERMINED ) ;
2009-05-11 15:20:27 -06:00
2009-06-09 19:26:42 -06:00
GameIni . Get ( " Video " , " ProjectionHack " , & iTemp , - 1 ) ;
2009-05-11 15:20:27 -06:00
Hack - > SetSelection ( iTemp ) ;
2009-05-10 06:33:47 -06:00
2008-12-07 22:30:24 -07:00
GameIni . Get ( " EmuState " , " EmulationStateId " , & iTemp , - 1 ) ;
EmuState - > SetSelection ( iTemp ) ;
2009-02-21 07:40:34 -07:00
GameIni . Get ( " EmuState " , " EmulationIssues " , & sTemp ) ;
if ( ! sTemp . empty ( ) )
{
2009-02-21 21:26:09 -07:00
EmuIssues - > SetValue ( wxString : : FromAscii ( sTemp . c_str ( ) ) ) ;
2009-02-21 07:40:34 -07:00
bRefreshList = true ;
}
2009-03-24 17:10:43 -06:00
EmuIssues - > Enable ( EmuState - > GetSelection ( ) = = 2 ) ;
2009-02-21 07:40:34 -07:00
2008-12-07 22:30:24 -07:00
PatchList_Load ( ) ;
ActionReplayList_Load ( ) ;
}
bool CISOProperties : : SaveGameConfig ( )
{
if ( UseDualCore - > Get3StateValue ( ) = = wxCHK_UNDETERMINED )
GameIni . DeleteKey ( " Core " , " UseDualCore " ) ;
else
GameIni . Set ( " Core " , " UseDualCore " , UseDualCore - > Get3StateValue ( ) ) ;
if ( SkipIdle - > Get3StateValue ( ) = = wxCHK_UNDETERMINED )
GameIni . DeleteKey ( " Core " , " SkipIdle " ) ;
else
GameIni . Set ( " Core " , " SkipIdle " , SkipIdle - > Get3StateValue ( ) ) ;
if ( OptimizeQuantizers - > Get3StateValue ( ) = = wxCHK_UNDETERMINED )
GameIni . DeleteKey ( " Core " , " OptimizeQuantizers " ) ;
else
GameIni . Set ( " Core " , " OptimizeQuantizers " , OptimizeQuantizers - > Get3StateValue ( ) ) ;
2009-03-22 14:13:30 -06:00
2009-03-04 09:56:49 -07:00
if ( TLBHack - > Get3StateValue ( ) = = wxCHK_UNDETERMINED )
GameIni . DeleteKey ( " Core " , " TLBHack " ) ;
else
GameIni . Set ( " Core " , " TLBHack " , TLBHack - > Get3StateValue ( ) ) ;
2009-03-22 14:13:30 -06:00
2009-03-24 17:10:43 -06:00
if ( EnableProgressiveScan - > Get3StateValue ( ) = = wxCHK_UNDETERMINED )
GameIni . DeleteKey ( " Wii " , " ProgressiveScan " ) ;
else
GameIni . Set ( " Wii " , " ProgressiveScan " , EnableProgressiveScan - > Get3StateValue ( ) ) ;
if ( EnableWideScreen - > Get3StateValue ( ) = = wxCHK_UNDETERMINED )
GameIni . DeleteKey ( " Wii " , " Widescreen " ) ;
else
GameIni . Set ( " Wii " , " Widescreen " , EnableWideScreen - > Get3StateValue ( ) ) ;
2009-03-22 15:24:38 -06:00
if ( ForceFiltering - > Get3StateValue ( ) = = wxCHK_UNDETERMINED )
GameIni . DeleteKey ( " Video " , " ForceFiltering " ) ;
else
2009-03-22 18:48:51 -06:00
GameIni . Set ( " Video " , " ForceFiltering " , ForceFiltering - > Get3StateValue ( ) ) ;
2009-03-22 15:24:38 -06:00
if ( EFBCopyDisable - > Get3StateValue ( ) = = wxCHK_UNDETERMINED )
GameIni . DeleteKey ( " Video " , " EFBCopyDisable " ) ;
else
2009-03-22 18:48:51 -06:00
GameIni . Set ( " Video " , " EFBCopyDisable " , EFBCopyDisable - > Get3StateValue ( ) ) ;
2009-03-22 15:24:38 -06:00
if ( EFBToTextureEnable - > Get3StateValue ( ) = = wxCHK_UNDETERMINED )
GameIni . DeleteKey ( " Video " , " EFBToTextureEnable " ) ;
else
2009-03-22 18:48:51 -06:00
GameIni . Set ( " Video " , " EFBToTextureEnable " , EFBToTextureEnable - > Get3StateValue ( ) ) ;
2009-03-22 15:24:38 -06:00
if ( SafeTextureCache - > Get3StateValue ( ) = = wxCHK_UNDETERMINED )
GameIni . DeleteKey ( " Video " , " SafeTextureCache " ) ;
else
2009-03-22 18:48:51 -06:00
GameIni . Set ( " Video " , " SafeTextureCache " , SafeTextureCache - > Get3StateValue ( ) ) ;
2009-03-22 15:24:38 -06:00
if ( DstAlphaPass - > Get3StateValue ( ) = = wxCHK_UNDETERMINED )
GameIni . DeleteKey ( " Video " , " DstAlphaPass " ) ;
else
2009-03-22 18:48:51 -06:00
GameIni . Set ( " Video " , " DstAlphaPass " , DstAlphaPass - > Get3StateValue ( ) ) ;
2009-03-22 15:24:38 -06:00
if ( UseXFB - > Get3StateValue ( ) = = wxCHK_UNDETERMINED )
GameIni . DeleteKey ( " Video " , " UseXFB " ) ;
else
2009-03-22 18:48:51 -06:00
GameIni . Set ( " Video " , " UseXFB " , UseXFB - > Get3StateValue ( ) ) ;
2009-05-10 06:33:47 -06:00
if ( UseRE0Fix - > Get3StateValue ( ) = = wxCHK_UNDETERMINED )
GameIni . DeleteKey ( " HLEaudio " , " UseRE0Fix " ) ;
else
GameIni . Set ( " HLEaudio " , " UseRE0Fix " , UseRE0Fix - > Get3StateValue ( ) ) ;
2009-03-22 15:24:38 -06:00
2009-06-07 19:23:10 -06:00
if ( EmuState - > GetSelection ( ) = = - 1 )
2009-06-09 19:26:42 -06:00
GameIni . DeleteKey ( " Video " , " ProjectionHack " ) ;
2009-06-07 19:23:10 -06:00
else
2009-06-09 19:26:42 -06:00
GameIni . Set ( " Video " , " ProjectionHack " , Hack - > GetSelection ( ) ) ;
2009-06-07 19:23:10 -06:00
if ( EmuState - > GetSelection ( ) = = - 1 )
GameIni . DeleteKey ( " EmuState " , " EmulationStateId " ) ;
else
GameIni . Set ( " EmuState " , " EmulationStateId " , EmuState - > GetSelection ( ) ) ;
2009-07-30 01:09:26 -06:00
GameIni . Set ( " EmuState " , " EmulationIssues " , ( const char * ) EmuIssues - > GetValue ( ) . mb_str ( wxConvUTF8 ) ) ;
2008-12-07 22:30:24 -07:00
PatchList_Save ( ) ;
ActionReplayList_Save ( ) ;
return GameIni . Save ( GameIniFile . c_str ( ) ) ;
}
void CISOProperties : : OnEditConfig ( wxCommandEvent & WXUNUSED ( event ) )
{
if ( wxFileExists ( wxString : : FromAscii ( GameIniFile . c_str ( ) ) ) )
{
SaveGameConfig ( ) ;
wxFileType * filetype = wxTheMimeTypesManager - > GetFileTypeFromExtension ( _ ( " ini " ) ) ;
2008-12-09 16:27:08 -07:00
if ( filetype = = NULL ) // From extension failed, trying with MIME type now
2008-12-09 16:19:44 -07:00
{
2008-12-09 16:27:08 -07:00
filetype = wxTheMimeTypesManager - > GetFileTypeFromMimeType ( _ ( " text/plain " ) ) ;
if ( filetype = = NULL ) // MIME type failed, aborting mission
{
PanicAlert ( " Filetype 'ini' is unknown! Will not open! " ) ;
return ;
}
2008-12-09 16:19:44 -07:00
}
wxString OpenCommand ;
OpenCommand = filetype - > GetOpenCommand ( wxString : : FromAscii ( GameIniFile . c_str ( ) ) ) ;
if ( OpenCommand . IsEmpty ( ) )
PanicAlert ( " Couldn't find open command for extension 'ini'! " ) ;
else
if ( wxExecute ( OpenCommand , wxEXEC_SYNC ) = = - 1 )
PanicAlert ( " wxExecute returned -1 on application run! " ) ;
2008-12-07 22:30:24 -07:00
GameIni . Load ( GameIniFile . c_str ( ) ) ;
LoadGameConfig ( ) ;
bRefreshList = true ; // Just in case
}
2009-06-06 20:54:07 -06:00
// Once we're done with the ini edit, give the focus back to Dolphin
SetFocus ( ) ;
2008-12-07 22:30:24 -07:00
}
void CISOProperties : : ListSelectionChanged ( wxCommandEvent & event )
{
switch ( event . GetId ( ) )
{
case ID_PATCHES_LIST :
if ( Patches - > GetSelection ( ) ! = wxNOT_FOUND )
{
EditPatch - > Enable ( ) ;
RemovePatch - > Enable ( ) ;
}
break ;
case ID_CHEATS_LIST :
if ( Cheats - > GetSelection ( ) ! = wxNOT_FOUND )
{
EditCheat - > Enable ( ) ;
RemoveCheat - > Enable ( ) ;
}
break ;
}
}
void CISOProperties : : PatchList_Load ( )
{
onFrame . clear ( ) ;
Patches - > Clear ( ) ;
PatchEngine : : LoadPatchSection ( " OnFrame " , onFrame , GameIni ) ;
u32 index = 0 ;
for ( std : : vector < PatchEngine : : Patch > : : const_iterator it = onFrame . begin ( ) ; it ! = onFrame . end ( ) ; + + it )
{
PatchEngine : : Patch p = * it ;
Patches - > Append ( wxString : : FromAscii ( p . name . c_str ( ) ) ) ;
Patches - > Check ( index , p . active ) ;
+ + index ;
}
}
void CISOProperties : : PatchList_Save ( )
{
std : : vector < std : : string > lines ;
2009-01-03 16:02:13 -07:00
u32 index = 0 ;
2008-12-07 22:30:24 -07:00
for ( std : : vector < PatchEngine : : Patch > : : const_iterator onFrame_it = onFrame . begin ( ) ; onFrame_it ! = onFrame . end ( ) ; + + onFrame_it )
{
2009-01-03 16:02:13 -07:00
lines . push_back ( Patches - > IsChecked ( index ) ? " +$ " + onFrame_it - > name : " $ " + onFrame_it - > name ) ;
2008-12-07 22:30:24 -07:00
for ( std : : vector < PatchEngine : : PatchEntry > : : const_iterator iter2 = onFrame_it - > entries . begin ( ) ; iter2 ! = onFrame_it - > entries . end ( ) ; + + iter2 )
{
2009-01-03 16:02:13 -07:00
std : : string temp ;
ToStringFromFormat ( & temp , " 0x%08X:%s:0x%08X " , iter2 - > address , PatchEngine : : PatchTypeStrings [ iter2 - > type ] , iter2 - > value ) ;
lines . push_back ( temp ) ;
2008-12-07 22:30:24 -07:00
}
2009-01-03 16:02:13 -07:00
+ + index ;
2008-12-07 22:30:24 -07:00
}
GameIni . SetLines ( " OnFrame " , lines ) ;
lines . clear ( ) ;
}
void CISOProperties : : PatchButtonClicked ( wxCommandEvent & event )
{
int selection = Patches - > GetSelection ( ) ;
switch ( event . GetId ( ) )
{
case ID_EDITPATCH :
{
CPatchAddEdit dlg ( selection , this ) ;
dlg . ShowModal ( ) ;
}
break ;
case ID_ADDPATCH :
{
2009-01-03 14:55:49 -07:00
CPatchAddEdit dlg ( - 1 , this , 1 , _ ( " Add Patch " ) ) ;
2009-01-03 16:02:13 -07:00
if ( dlg . ShowModal ( ) = = wxID_OK )
{
Patches - > Append ( wxString : : FromAscii ( onFrame . back ( ) . name . c_str ( ) ) ) ;
2009-01-23 17:45:46 -07:00
Patches - > Check ( ( unsigned int ) ( onFrame . size ( ) - 1 ) , onFrame . back ( ) . active ) ;
2009-01-03 16:02:13 -07:00
}
2008-12-07 22:30:24 -07:00
}
break ;
case ID_REMOVEPATCH :
onFrame . erase ( onFrame . begin ( ) + Patches - > GetSelection ( ) ) ;
break ;
}
PatchList_Save ( ) ;
Patches - > Clear ( ) ;
PatchList_Load ( ) ;
EditPatch - > Enable ( false ) ;
RemovePatch - > Enable ( false ) ;
}
void CISOProperties : : ActionReplayList_Load ( )
{
2008-12-16 21:14:24 -07:00
arCodes . clear ( ) ;
2008-12-07 22:30:24 -07:00
Cheats - > Clear ( ) ;
2008-12-16 21:14:24 -07:00
ActionReplay : : LoadCodes ( arCodes , GameIni ) ;
2008-12-07 22:30:24 -07:00
2008-12-16 21:14:24 -07:00
u32 index = 0 ;
for ( std : : vector < ActionReplay : : ARCode > : : const_iterator it = arCodes . begin ( ) ; it ! = arCodes . end ( ) ; + + it )
2008-12-07 22:30:24 -07:00
{
2008-12-16 21:14:24 -07:00
ActionReplay : : ARCode arCode = * it ;
Cheats - > Append ( wxString : : FromAscii ( arCode . name . c_str ( ) ) ) ;
Cheats - > Check ( index , arCode . active ) ;
+ + index ;
2008-12-07 22:30:24 -07:00
}
}
void CISOProperties : : ActionReplayList_Save ( )
{
std : : vector < std : : string > lines ;
2008-12-16 21:14:24 -07:00
u32 index = 0 ;
for ( std : : vector < ActionReplay : : ARCode > : : const_iterator iter = arCodes . begin ( ) ; iter ! = arCodes . end ( ) ; + + iter )
2008-12-07 22:30:24 -07:00
{
2008-12-16 21:14:24 -07:00
ActionReplay : : ARCode code = * iter ;
2008-12-07 22:30:24 -07:00
2008-12-16 21:14:24 -07:00
lines . push_back ( Cheats - > IsChecked ( index ) ? " +$ " + code . name : " $ " + code . name ) ;
2008-12-07 22:30:24 -07:00
2008-12-16 21:14:24 -07:00
for ( std : : vector < ActionReplay : : AREntry > : : const_iterator iter2 = code . ops . begin ( ) ; iter2 ! = code . ops . end ( ) ; + + iter2 )
2008-12-07 22:30:24 -07:00
{
2008-12-17 02:46:32 -07:00
lines . push_back ( std : : string ( wxString : : Format ( wxT ( " %08X %08X " ) , iter2 - > cmd_addr , iter2 - > value ) . mb_str ( ) ) ) ;
2008-12-07 22:30:24 -07:00
}
2008-12-16 21:14:24 -07:00
+ + index ;
2008-12-07 22:30:24 -07:00
}
GameIni . SetLines ( " ActionReplay " , lines ) ;
}
void CISOProperties : : ActionReplayButtonClicked ( wxCommandEvent & event )
{
2008-12-16 21:14:24 -07:00
int selection = Cheats - > GetSelection ( ) ;
2008-12-07 22:30:24 -07:00
switch ( event . GetId ( ) )
{
case ID_EDITCHEAT :
2008-12-16 21:14:24 -07:00
{
CARCodeAddEdit dlg ( selection , this ) ;
dlg . ShowModal ( ) ;
}
2008-12-07 22:30:24 -07:00
break ;
case ID_ADDCHEAT :
2008-12-16 21:14:24 -07:00
{
2009-04-08 10:38:41 -06:00
CARCodeAddEdit dlg ( - 1 , this , 1 , _ ( " Add ActionReplay Code " ) ) ;
2009-02-19 17:07:35 -07:00
if ( dlg . ShowModal ( ) = = wxID_OK )
{
Cheats - > Append ( wxString : : FromAscii ( arCodes . back ( ) . name . c_str ( ) ) ) ;
Cheats - > Check ( ( unsigned int ) ( arCodes . size ( ) - 1 ) , arCodes . back ( ) . active ) ;
}
2008-12-16 21:14:24 -07:00
}
2008-12-07 22:30:24 -07:00
break ;
case ID_REMOVECHEAT :
2008-12-16 21:14:24 -07:00
arCodes . erase ( arCodes . begin ( ) + Cheats - > GetSelection ( ) ) ;
2008-12-07 22:30:24 -07:00
break ;
}
ActionReplayList_Save ( ) ;
Cheats - > Clear ( ) ;
ActionReplayList_Load ( ) ;
EditCheat - > Enable ( false ) ;
RemoveCheat - > Enable ( false ) ;
}
2009-02-14 10:32:03 -07:00
void CISOProperties : : OnChangeBannerLang ( wxCommandEvent & event )
{
ChangeBannerDetails ( event . GetSelection ( ) ) ;
}
void CISOProperties : : ChangeBannerDetails ( int lang )
{
2009-08-07 02:52:04 -06:00
wxString name ,
description ;
WxUtils : : CopySJISToString ( name , OpenGameListItem - > GetName ( lang ) . c_str ( ) ) ;
WxUtils : : CopySJISToString ( description , OpenGameListItem - > GetDescription ( lang ) . c_str ( ) ) ;
2009-02-28 21:16:15 -07:00
m_ShortName - > SetValue ( name ) ;
2009-03-01 05:39:21 -07:00
m_Maker - > SetValue ( wxString : : FromAscii ( OpenGameListItem - > GetCompany ( ) . c_str ( ) ) ) ; //dev too
2009-02-28 21:16:15 -07:00
m_Comment - > SetValue ( description ) ;
2009-02-14 10:32:03 -07:00
}