2012-12-19 09:30:18 +00:00
|
|
|
/****************************************************************************
|
|
|
|
* *
|
|
|
|
* Project 64 - A Nintendo 64 emulator. *
|
|
|
|
* http://www.pj64-emu.com/ *
|
|
|
|
* Copyright (C) 2012 Project64. All rights reserved. *
|
|
|
|
* *
|
|
|
|
* License: *
|
|
|
|
* GNU/GPLv2 http://www.gnu.org/licenses/gpl-2.0.html *
|
|
|
|
* *
|
|
|
|
****************************************************************************/
|
2010-06-07 02:23:58 +00:00
|
|
|
#include "stdafx.h"
|
2015-09-07 19:47:44 +00:00
|
|
|
|
2008-09-18 03:15:49 +00:00
|
|
|
#include "Settings Page.h"
|
|
|
|
#include "Settings Page - Game - General.h"
|
|
|
|
|
2015-11-07 01:11:25 +00:00
|
|
|
CGameGeneralPage::CGameGeneralPage(HWND hParent, const RECT & rcDispay)
|
2008-09-18 03:15:49 +00:00
|
|
|
{
|
2015-11-07 01:11:25 +00:00
|
|
|
if (!Create(hParent, rcDispay))
|
2008-09-18 03:15:49 +00:00
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
2008-11-14 20:51:06 +00:00
|
|
|
|
2015-03-17 02:56:53 +00:00
|
|
|
//Set the text for all gui Items
|
2015-03-20 18:36:29 +00:00
|
|
|
SetDlgItemTextW(m_hWnd, IDC_GOOD_NAME_TEXT, GS(RB_GOODNAME));
|
|
|
|
|
2015-03-17 02:56:53 +00:00
|
|
|
SetDlgItemTextW(m_hWnd, IDC_MEMORY_SIZE_TEXT, GS(ROM_MEM_SIZE));
|
|
|
|
SetDlgItemTextW(m_hWnd, IDC_SAVE_TYPE_TEXT, GS(ROM_SAVE_TYPE));
|
|
|
|
SetDlgItemTextW(m_hWnd, IDC_COUNTFACT_TEXT, GS(ROM_COUNTER_FACTOR));
|
2015-03-20 19:38:55 +00:00
|
|
|
SetDlgItemTextW(m_hWnd, IDC_VIREFESH_TEXT, GS(ROM_VIREFRESH));
|
|
|
|
SetDlgItemTextW(m_hWnd, IDC_COUNTPERBYTE_TEXT, GS(ROM_COUNTPERBYTE));
|
2015-03-17 02:56:53 +00:00
|
|
|
|
2015-03-20 19:38:55 +00:00
|
|
|
SetDlgItemTextW(m_hWnd, IDC_ROM_32BIT, GS(ROM_32BIT));
|
2015-03-17 02:56:53 +00:00
|
|
|
SetDlgItemTextW(m_hWnd, IDC_ROM_FIXEDAUDIO, GS(ROM_FIXED_AUDIO));
|
2015-03-20 19:38:55 +00:00
|
|
|
SetDlgItemTextW(m_hWnd, IDC_DELAY_DP, GS(ROM_DELAY_DP));
|
|
|
|
SetDlgItemTextW(m_hWnd, IDC_SYNC_AUDIO, GS(ROM_SYNC_AUDIO));
|
2015-03-17 02:56:53 +00:00
|
|
|
SetDlgItemTextW(m_hWnd, IDC_USE_TLB, GS(ROM_USE_TLB));
|
2015-11-07 01:11:25 +00:00
|
|
|
SetDlgItemTextW(m_hWnd, IDC_DELAY_SI, GS(ROM_DELAY_SI));
|
|
|
|
SetDlgItemTextW(m_hWnd, IDC_AUDIO_SIGNAL, GS(ROM_AUDIO_SIGNAL));
|
2015-03-17 02:56:53 +00:00
|
|
|
|
2015-11-07 01:11:25 +00:00
|
|
|
AddModCheckBox(GetDlgItem(IDC_ROM_32BIT), Game_32Bit);
|
|
|
|
AddModCheckBox(GetDlgItem(IDC_SYNC_AUDIO), Game_SyncViaAudio);
|
|
|
|
AddModCheckBox(GetDlgItem(IDC_ROM_FIXEDAUDIO), Game_FixedAudio);
|
|
|
|
AddModCheckBox(GetDlgItem(IDC_USE_TLB), Game_UseTlb);
|
|
|
|
AddModCheckBox(GetDlgItem(IDC_DELAY_DP), Game_DelayDP);
|
|
|
|
AddModCheckBox(GetDlgItem(IDC_DELAY_SI), Game_DelaySI);
|
|
|
|
AddModCheckBox(GetDlgItem(IDC_AUDIO_SIGNAL), Game_RspAudioSignal);
|
2008-11-14 20:51:06 +00:00
|
|
|
|
|
|
|
CModifiedComboBox * ComboBox;
|
2015-11-07 01:11:25 +00:00
|
|
|
ComboBox = AddModComboBox(GetDlgItem(IDC_RDRAM_SIZE), Game_RDRamSize);
|
2008-11-14 20:51:06 +00:00
|
|
|
if (ComboBox)
|
|
|
|
{
|
|
|
|
ComboBox->SetTextField(GetDlgItem(IDC_MEMORY_SIZE_TEXT));
|
2015-11-07 01:11:25 +00:00
|
|
|
ComboBox->AddItemW(GS(RDRAM_4MB), 0x400000);
|
|
|
|
ComboBox->AddItemW(GS(RDRAM_8MB), 0x800000);
|
2008-11-14 20:51:06 +00:00
|
|
|
}
|
|
|
|
|
2015-11-07 01:11:25 +00:00
|
|
|
ComboBox = AddModComboBox(GetDlgItem(IDC_SAVE_TYPE), Game_SaveChip);
|
2008-11-14 20:51:06 +00:00
|
|
|
if (ComboBox)
|
|
|
|
{
|
|
|
|
ComboBox->SetTextField(GetDlgItem(IDC_SAVE_TYPE_TEXT));
|
2015-11-07 01:11:25 +00:00
|
|
|
ComboBox->AddItemW(GS(SAVE_FIRST_USED), (WPARAM)SaveChip_Auto);
|
|
|
|
ComboBox->AddItemW(GS(SAVE_4K_EEPROM), SaveChip_Eeprom_4K);
|
|
|
|
ComboBox->AddItemW(GS(SAVE_16K_EEPROM), SaveChip_Eeprom_16K);
|
|
|
|
ComboBox->AddItemW(GS(SAVE_SRAM), SaveChip_Sram);
|
|
|
|
ComboBox->AddItemW(GS(SAVE_FLASHRAM), SaveChip_FlashRam);
|
2008-11-14 20:51:06 +00:00
|
|
|
}
|
|
|
|
|
2015-11-07 01:11:25 +00:00
|
|
|
ComboBox = AddModComboBox(GetDlgItem(IDC_COUNTFACT), Game_CounterFactor);
|
2008-11-14 20:51:06 +00:00
|
|
|
if (ComboBox)
|
|
|
|
{
|
|
|
|
ComboBox->SetTextField(GetDlgItem(IDC_COUNTFACT_TEXT));
|
2015-11-07 01:11:25 +00:00
|
|
|
ComboBox->AddItemW(GS(NUMBER_1), 1);
|
|
|
|
ComboBox->AddItemW(GS(NUMBER_2), 2);
|
|
|
|
ComboBox->AddItemW(GS(NUMBER_3), 3);
|
|
|
|
ComboBox->AddItemW(GS(NUMBER_4), 4);
|
|
|
|
ComboBox->AddItemW(GS(NUMBER_5), 5);
|
|
|
|
ComboBox->AddItemW(GS(NUMBER_6), 6);
|
2008-11-14 20:51:06 +00:00
|
|
|
}
|
|
|
|
|
2015-11-07 01:11:25 +00:00
|
|
|
SetDlgItemText(IDC_GOOD_NAME, g_Settings->LoadStringVal(Game_GoodName).c_str());
|
2008-11-14 20:51:06 +00:00
|
|
|
|
2015-11-07 01:11:25 +00:00
|
|
|
CModifiedEditBox * TxtBox = AddModTextBox(GetDlgItem(IDC_VIREFRESH), Game_ViRefreshRate, false);
|
2008-12-04 10:41:51 +00:00
|
|
|
TxtBox->SetTextField(GetDlgItem(IDC_VIREFESH_TEXT));
|
|
|
|
|
2015-11-07 01:11:25 +00:00
|
|
|
TxtBox = AddModTextBox(GetDlgItem(IDC_COUNTPERBYTE), Game_AiCountPerBytes, false);
|
2012-11-13 05:44:13 +00:00
|
|
|
TxtBox->SetTextField(GetDlgItem(IDC_COUNTPERBYTE_TEXT));
|
|
|
|
|
2008-11-14 20:51:06 +00:00
|
|
|
UpdatePageSettings();
|
2008-09-18 03:15:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void CGameGeneralPage::ShowPage()
|
|
|
|
{
|
|
|
|
ShowWindow(SW_SHOW);
|
|
|
|
}
|
|
|
|
|
|
|
|
void CGameGeneralPage::HidePage()
|
|
|
|
{
|
|
|
|
ShowWindow(SW_HIDE);
|
2008-11-14 20:51:06 +00:00
|
|
|
}
|
|
|
|
|
2015-11-07 01:11:25 +00:00
|
|
|
void CGameGeneralPage::ApplySettings(bool UpdateScreen)
|
2008-11-14 20:51:06 +00:00
|
|
|
{
|
|
|
|
CSettingsPageImpl<CGameGeneralPage>::ApplySettings(UpdateScreen);
|
|
|
|
}
|
|
|
|
|
2015-11-07 01:11:25 +00:00
|
|
|
bool CGameGeneralPage::EnableReset(void)
|
2008-11-14 20:51:06 +00:00
|
|
|
{
|
|
|
|
if (CSettingsPageImpl<CGameGeneralPage>::EnableReset()) { return true; }
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
void CGameGeneralPage::ResetPage()
|
|
|
|
{
|
|
|
|
CSettingsPageImpl<CGameGeneralPage>::ResetPage();
|
2015-11-07 01:11:25 +00:00
|
|
|
}
|