RTEXT "Port 1:",IDC_STATIC,4,30,37,15,SS_CENTERIMAGE
COMBOBOX IDC_PORT0_JOYS,45,31,342,130,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_PORT0_AF,45,49,86,130,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- COMBOBOX IDC_PORT0_JOYSMODE,136,50,106,130,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ COMBOBOX IDC_PORT0_JOYSMODE,136,49,106,130,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Remap / Test [] Remap or test Port 1 configurarion.",IDC_PORT0_REMAP,310,49,78,14
RTEXT "Port 2:",IDC_STATIC,6,68,35,15,SS_CENTERIMAGE
COMBOBOX IDC_PORT1_JOYS,45,69,342,130,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD
FONT 8, "MS Sans Serif", 0, 0, 0x0
BEGIN
- CONTROL "",IDC_RICHEDIT1,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,65,36,210,35
- CONTROL "",IDC_RICHEDIT2,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,1,84,343,28
- PUSHBUTTON "Contributors",IDC_CONTRIBUTORS,132,126,80,15
- CONTROL "",IDC_CLOANTOHOME,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,2,194,112,24
- CONTROL "",IDC_AMIGAHOME,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,116,194,112,24
- CONTROL "",IDC_WINUAEHOME,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,231,194,112,24
- CONTROL "",IDC_ABIME,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,60,222,112,24
- CONTROL "",IDC_CAPS,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,174,222,112,24
- CONTROL "",IDC_AMIGASYS,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,2,251,112,24
- CONTROL "",IDC_AMIKIT,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,231,251,112,24
+ CONTROL "",IDC_RICHEDIT1,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,85,36,210,35
+ CONTROL "",IDC_RICHEDIT2,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,21,84,343,28
+ PUSHBUTTON "Contributors",IDC_CONTRIBUTORS,152,126,80,15
+ CONTROL "",IDC_CLOANTOHOME,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,22,194,112,24
+ CONTROL "",IDC_AMIGAHOME,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,136,194,112,24
+ CONTROL "",IDC_WINUAEHOME,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,251,194,112,24
+ CONTROL "",IDC_ABIME,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,22,222,112,24
+ CONTROL "",IDC_CAPS,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,136,222,112,24
+ CONTROL "",IDC_AMIGASYS,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,136,255,112,24
+ CONTROL "",IDC_AMIKIT,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,251,222,112,24
END
IDD_MISC1 DIALOGEX 0, 0, 396, 316
SetDlgItemText (hDlg, IDC_ERRORLOGMESSAGE, err);
xSendDlgItemMessage (hDlg, IDC_ERRORLOGMESSAGE, EM_GETCHARFORMAT, 0, (LPARAM) & CharFormat);
CharFormat.dwMask |= CFM_SIZE | CFM_FACE;
- CharFormat.yHeight = 8 * 20; /* height in twips, where a twip is 1/20th of a point - for a pt.size of 18 */
+ CharFormat.yHeight = getscaledfontsize(8 * 20); /* height in twips, where a twip is 1/20th of a point - for a pt.size of 18 */
_tcscpy (CharFormat.szFaceName, _T("Segoe UI"));
xSendDlgItemMessage (hDlg, IDC_ERRORLOGMESSAGE, EM_SETCHARFORMAT, SCF_ALL, (LPARAM) & CharFormat);
return TRUE;
return FALSE;
}
+static TCHAR szContributors1[MAX_CONTRIBUTORS_LENGTH];
+static TCHAR szContributors2[MAX_CONTRIBUTORS_LENGTH];
+static TCHAR szContributors[MAX_CONTRIBUTORS_LENGTH * 2];
+
static INT_PTR CALLBACK ContributorsProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
CHARFORMAT CharFormat;
- TCHAR szContributors1[MAX_CONTRIBUTORS_LENGTH];
- TCHAR szContributors2[MAX_CONTRIBUTORS_LENGTH];
- TCHAR szContributors[MAX_CONTRIBUTORS_LENGTH * 2];
if (dialog_inhibit)
return 0;
SetDlgItemText (hDlg, IDC_CONTRIBUTORS, szContributors );
xSendDlgItemMessage (hDlg, IDC_CONTRIBUTORS, EM_GETCHARFORMAT, 0, (LPARAM) & CharFormat);
CharFormat.dwMask |= CFM_SIZE | CFM_FACE;
- CharFormat.yHeight = 8 * 20; /* height in twips, where a twip is 1/20th of a point - for a pt.size of 18 */
+ CharFormat.yHeight = getscaledfontsize(8 * 20); /* height in twips, where a twip is 1/20th of a point - for a pt.size of 18 */
_tcscpy (CharFormat.szFaceName, _T("Segoe UI"));
xSendDlgItemMessage (hDlg, IDC_CONTRIBUTORS, EM_SETCHARFORMAT, SCF_ALL, (LPARAM) & CharFormat);
// {IDC_THEROOTS, FALSE, _T("Back To The Roots"), _T("http://back2roots.abime.net/")},
{IDC_ABIME, FALSE, _T("abime.net"), _T("http://www.abime.net/")},
{IDC_CAPS, FALSE, _T("SPS"), _T("http://www.softpres.org/")},
- {IDC_AMIGASYS, FALSE, _T("AmigaSYS"), _T("http://www.amigasys.com/")},
+// {IDC_AMIGASYS, FALSE, _T("AmigaSYS"), _T("http://www.amigasys.com/")},
{IDC_AMIKIT, FALSE, _T("AmiKit"), _T("http://amikit.amiga.sk/")},
{ -1, FALSE, NULL, NULL }
};
xSendDlgItemMessage (hDlg, url->id, EM_GETCHARFORMAT, 0, (LPARAM)&CharFormat);
CharFormat.dwMask |= CFM_UNDERLINE | CFM_SIZE | CFM_FACE | CFM_COLOR;
CharFormat.dwEffects = url->state ? CFE_UNDERLINE : 0;
- CharFormat.yHeight = 10 * 20; /* height in twips, where a twip is 1/20th of a point - for a pt.size of 18 */
+ CharFormat.yHeight = getscaledfontsize(10 * 20); /* height in twips, where a twip is 1/20th of a point - for a pt.size of 18 */
CharFormat.crTextColor = GetSysColor (COLOR_ACTIVECAPTION);
_tcscpy (CharFormat.szFaceName, _T("Segoe UI"));
xSendDlgItemMessage (hDlg, IDC_RICHEDIT1, EM_GETCHARFORMAT, 0, (LPARAM) & CharFormat);
CharFormat.dwMask |= CFM_BOLD | CFM_SIZE | CFM_FACE;
CharFormat.dwEffects = CFE_BOLD;
- CharFormat.yHeight = 24 * 20; /* height in twips, where a twip is 1/20th of a point */
+ CharFormat.yHeight = getscaledfontsize(24 * 20); /* height in twips, where a twip is 1/20th of a point */
_tcscpy (CharFormat.szFaceName, _T("Segoe UI"));
xSendDlgItemMessage (hDlg, IDC_RICHEDIT1, EM_SETCHARFORMAT, SCF_ALL, (LPARAM) & CharFormat);
SetDlgItemText (hDlg, IDC_RICHEDIT2, VersionStr );
xSendDlgItemMessage (hDlg, IDC_RICHEDIT2, EM_GETCHARFORMAT, 0, (LPARAM) & CharFormat);
CharFormat.dwMask |= CFM_SIZE | CFM_FACE;
- CharFormat.yHeight = 12 * 20;
+ CharFormat.yHeight = getscaledfontsize(12 * 20);
_tcscpy (CharFormat.szFaceName, _T("Segoe UI"));
xSendDlgItemMessage (hDlg, IDC_RICHEDIT2, EM_SETCHARFORMAT, SCF_ALL, (LPARAM) & CharFormat);
xSendDlgItemMessage (hDlg, IDC_RICHEDIT2, EM_SETBKGNDCOLOR, 0, GetSysColor (COLOR_3DFACE));
static const int fpu_ids[] = { IDC_FPU0, IDC_FPU1, IDC_FPU2, IDC_FPU3 };
static const int trust_ids[] = { IDC_TRUST0, IDC_TRUST1, IDC_TRUST1, IDC_TRUST1 };
+static void cpudlg_slider_setup(HWND hDlg)
+{
+ xSendDlgItemMessage(hDlg, IDC_SPEED, TBM_SETRANGE, TRUE, workprefs.m68k_speed < 0 || (workprefs.cpu_memory_cycle_exact && !workprefs.cpu_cycle_exact) ? MAKELONG(-9, 0) : MAKELONG(-9, 50));
+ xSendDlgItemMessage(hDlg, IDC_SPEED, TBM_SETPAGESIZE, 0, 1);
+ xSendDlgItemMessage(hDlg, IDC_SPEED_x86, TBM_SETRANGE, TRUE, MAKELONG(0, 1000));
+ xSendDlgItemMessage(hDlg, IDC_SPEED_x86, TBM_SETPAGESIZE, 0, 10);
+}
+
static void enable_for_cpudlg (HWND hDlg)
{
BOOL enable = FALSE, jitenable = FALSE;
ew(hDlg, IDC_MMUENABLE, workprefs.cpu_model >= 68030 && workprefs.cachesize == 0);
ew(hDlg, IDC_CPUDATACACHE, workprefs.cpu_model >= 68030 && workprefs.cachesize == 0 && workprefs.cpu_compatible);
ew(hDlg, IDC_CPU_PPC, workprefs.cpu_model >= 68040 && (workprefs.ppc_mode == 1 || (workprefs.ppc_mode == 0 && !is_ppc_cpu(&workprefs))));
-
- xSendDlgItemMessage(hDlg, IDC_SPEED, TBM_SETRANGE, TRUE, workprefs.m68k_speed < 0 || (workprefs.cpu_memory_cycle_exact && !workprefs.cpu_cycle_exact) ? MAKELONG(-9, 0) : MAKELONG(-9, 50));
- xSendDlgItemMessage(hDlg, IDC_SPEED, TBM_SETPAGESIZE, 0, 1);
- xSendDlgItemMessage(hDlg, IDC_SPEED_x86, TBM_SETRANGE, TRUE, MAKELONG(0, 1000));
- xSendDlgItemMessage(hDlg, IDC_SPEED_x86, TBM_SETPAGESIZE, 0, 10);
}
static float getcpufreq (int m)
return f * (m >> 8) / 8.0f;
}
+static void values_to_cpudlg_sliders(HWND hDlg)
+{
+ TCHAR buffer[8] = _T("");
+ _stprintf(buffer, _T("%+d%%"), (int)(workprefs.x86_speed_throttle / 10));
+ SetDlgItemText(hDlg, IDC_CPUTEXT_x86, buffer);
+ _stprintf(buffer, _T("%+d%%"), (int)(workprefs.m68k_speed_throttle / 10));
+ SetDlgItemText(hDlg, IDC_CPUTEXT, buffer);
+ _stprintf(buffer, _T("%d%%"), (workprefs.cpu_idle == 0 ? 0 : 12 - workprefs.cpu_idle / 15) * 10);
+ SetDlgItemText(hDlg, IDC_CPUIDLETEXT, buffer);
+ _stprintf (buffer, _T("%d MB"), workprefs.cachesize / 1024 );
+ SetDlgItemText (hDlg, IDC_CACHETEXT, buffer);
+}
+
static void values_to_cpudlg(HWND hDlg, WPARAM wParam)
{
TCHAR buffer[8] = _T("");
int cpu;
xSendDlgItemMessage(hDlg, IDC_SPEED_x86, TBM_SETPOS, TRUE, (int)(workprefs.x86_speed_throttle / 100));
- _stprintf(buffer, _T("%+d%%"), (int)(workprefs.x86_speed_throttle / 10));
- SetDlgItemText(hDlg, IDC_CPUTEXT_x86, buffer);
-
xSendDlgItemMessage (hDlg, IDC_SPEED, TBM_SETPOS, TRUE, (int)(workprefs.m68k_speed_throttle / 100));
- _stprintf (buffer, _T("%+d%%"), (int)(workprefs.m68k_speed_throttle / 10));
- SetDlgItemText (hDlg, IDC_CPUTEXT, buffer);
+ values_to_cpudlg_sliders(hDlg);
CheckDlgButton (hDlg, IDC_COMPATIBLE, workprefs.cpu_compatible);
CheckDlgButton (hDlg, IDC_COMPATIBLE24, workprefs.address_space_24);
CheckDlgButton (hDlg, IDC_FPU_UNIMPLEMENTED, !workprefs.fpu_no_unimplemented || workprefs.cachesize);
CheckDlgButton (hDlg, IDC_CPU_UNIMPLEMENTED, !workprefs.int_no_unimplemented || workprefs.cachesize);
xSendDlgItemMessage (hDlg, IDC_CPUIDLE, TBM_SETPOS, TRUE, workprefs.cpu_idle == 0 ? 0 : 12 - workprefs.cpu_idle / 15);
- _stprintf(buffer, _T("%d%%"), (workprefs.cpu_idle == 0 ? 0 : 12 - workprefs.cpu_idle / 15) * 10);
- SetDlgItemText(hDlg, IDC_CPUIDLETEXT, buffer);
xSendDlgItemMessage (hDlg, IDC_PPC_CPUIDLE, TBM_SETPOS, TRUE, workprefs.ppc_cpu_idle);
cpu = (workprefs.cpu_model - 68000) / 10;
if (cpu >= 5)
}
}
xSendDlgItemMessage (hDlg, IDC_CACHE, TBM_SETPOS, TRUE, idx);
- _stprintf (buffer, _T("%d MB"), workprefs.cachesize / 1024 );
- SetDlgItemText (hDlg, IDC_CACHETEXT, buffer);
CheckDlgButton(hDlg, IDC_JITCRASH, workprefs.comp_catchfault);
CheckDlgButton(hDlg, IDC_NOFLAGS, workprefs.compnf);
workprefs.cachesize == 0;
CheckRadioButton (hDlg, IDC_MMUENABLEOFF, IDC_MMUENABLE, mmu == 0 ? IDC_MMUENABLEOFF : (mmu && workprefs.mmu_ec) ? IDC_MMUENABLEEC : IDC_MMUENABLE);
CheckDlgButton(hDlg, IDC_CPU_PPC, workprefs.ppc_mode || is_ppc_cpu(&workprefs));
+
+ idx = xSendDlgItemMessage(hDlg, IDC_CPU_FREQUENCY, CB_GETCURSEL, 0, 0);
+ if (idx != CB_ERR) {
+ int m = workprefs.cpu_clock_multiplier;
+ workprefs.cpu_frequency = 0;
+ workprefs.cpu_clock_multiplier = 0;
+ if (idx < 5) {
+ workprefs.cpu_clock_multiplier = (1 << 8) << idx;
+ if (workprefs.cpu_cycle_exact || workprefs.cpu_compatible) {
+ TCHAR txt[20];
+ double f = getcpufreq(workprefs.cpu_clock_multiplier);
+ _stprintf(txt, _T("%.6f"), f / 1000000.0);
+ xSendDlgItemMessage(hDlg, IDC_CPU_FREQUENCY2, WM_SETTEXT, 0, (LPARAM)txt);
+ } else {
+ xSendDlgItemMessage(hDlg, IDC_CPU_FREQUENCY2, WM_SETTEXT, 0, (LPARAM)_T(""));
+ }
+ } else if (workprefs.cpu_cycle_exact) {
+ TCHAR txt[20];
+ txt[0] = 0;
+ xSendDlgItemMessage(hDlg, IDC_CPU_FREQUENCY2, WM_GETTEXT, (WPARAM)sizeof(txt) / sizeof(TCHAR), (LPARAM)txt);
+ workprefs.cpu_clock_multiplier = 0;
+ workprefs.cpu_frequency = (int)(_tstof(txt) * 1000000.0);
+ if (workprefs.cpu_frequency < 1 * 1000000)
+ workprefs.cpu_frequency = 0;
+ if (workprefs.cpu_frequency >= 99 * 1000000)
+ workprefs.cpu_frequency = 0;
+ if (!workprefs.cpu_frequency) {
+ workprefs.cpu_frequency = (int)(getcpufreq(m) * 1000000.0);
+ }
+ }
+ }
}
static void values_from_cpudlg(HWND hDlg, WPARAM wParam)
SendMessage (pages[DISPLAY_ID], WM_USER, 0, 0);
if (pages[MEMORY_ID])
SendMessage (pages[MEMORY_ID], WM_USER, 0, 0);
-
- idx = xSendDlgItemMessage(hDlg, IDC_CPU_FREQUENCY, CB_GETCURSEL, 0, 0);
- if (idx != CB_ERR) {
- int m = workprefs.cpu_clock_multiplier;
- workprefs.cpu_frequency = 0;
- workprefs.cpu_clock_multiplier = 0;
- if (idx < 5) {
- workprefs.cpu_clock_multiplier = (1 << 8) << idx;
- if (workprefs.cpu_cycle_exact || workprefs.cpu_compatible) {
- TCHAR txt[20];
- double f = getcpufreq(workprefs.cpu_clock_multiplier);
- _stprintf(txt, _T("%.6f"), f / 1000000.0);
- xSendDlgItemMessage(hDlg, IDC_CPU_FREQUENCY2, WM_SETTEXT, 0, (LPARAM)txt);
- } else {
- xSendDlgItemMessage(hDlg, IDC_CPU_FREQUENCY2, WM_SETTEXT, 0, (LPARAM)_T(""));
- }
- } else if (workprefs.cpu_cycle_exact) {
- TCHAR txt[20];
- txt[0] = 0;
- xSendDlgItemMessage(hDlg, IDC_CPU_FREQUENCY2, WM_GETTEXT, (WPARAM)sizeof(txt) / sizeof(TCHAR), (LPARAM)txt);
- workprefs.cpu_clock_multiplier = 0;
- workprefs.cpu_frequency = (int)(_tstof(txt) * 1000000.0);
- if (workprefs.cpu_frequency < 1 * 1000000)
- workprefs.cpu_frequency = 0;
- if (workprefs.cpu_frequency >= 99 * 1000000)
- workprefs.cpu_frequency = 0;
- if (!workprefs.cpu_frequency) {
- workprefs.cpu_frequency = (int)(getcpufreq(m) * 1000000.0);
- }
- }
- }
}
static INT_PTR CALLBACK CPUDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
_stprintf(txt, _T("%.6f"), f / 1000000.0);
xSendDlgItemMessage(hDlg, IDC_CPU_FREQUENCY2, WM_SETTEXT, 0, (LPARAM)txt);
}
+
+ cpudlg_slider_setup(hDlg);
recursive--;
case WM_USER:
values_from_cpudlg(hDlg, wParam);
enable_for_cpudlg(hDlg);
values_to_cpudlg(hDlg, wParam);
+ cpudlg_slider_setup(hDlg);
recursive--;
}
break;
if (currentpage == CPU_ID) {
recursive++;
values_from_cpudlg(hDlg, wParam);
+ values_to_cpudlg_sliders(hDlg);
enable_for_cpudlg(hDlg);
- values_to_cpudlg(hDlg, wParam);
recursive--;
}
break;