From 91937748fa1ed17fccaeef870a454807acd821b6 Mon Sep 17 00:00:00 2001 From: Volker Ruppert Date: Sun, 14 Sep 2014 19:36:13 +0000 Subject: [PATCH] Added "DockOrder" setting to gui debugger INI file. Prepared handling of platform-specific settings (e.g. fonts, window sizes). --- bochs/gui/enh_dbg.cc | 8 +++++--- bochs/gui/enh_dbg.h | 2 ++ bochs/gui/gtk_enh_dbg_osdep.cc | 11 +++++++++++ bochs/gui/win32_enh_dbg_osdep.cc | 11 +++++++++++ 4 files changed, 29 insertions(+), 3 deletions(-) diff --git a/bochs/gui/enh_dbg.cc b/bochs/gui/enh_dbg.cc index ba66af090..a18814987 100644 --- a/bochs/gui/enh_dbg.cc +++ b/bochs/gui/enh_dbg.cc @@ -3527,8 +3527,9 @@ void ReadSettings() DumpWSIndex = atoi(val); DumpAlign = (1 << DumpWSIndex); PrevDAD = 0; - } else { - // TODO: add platform-specific settings + } else if (!strcmp(param, "DockOrder")) { + DockOrder = strtoul(val, NULL, 16); + } else if (!ParseOSSettings(param, val)) { fprintf(stderr, "bx_enh_dbg.ini: unknown option '%s'\n", line); } } @@ -3559,7 +3560,8 @@ void WriteSettings() fprintf(fd, "isLittleEndian = %s\n", isLittleEndian ? "TRUE" : "FALSE"); fprintf(fd, "DefaultAsmLines = %d\n", DefaultAsmLines); fprintf(fd, "DumpWSIndex = %d\n", DumpWSIndex); - // TODO: add platform-specific settings + fprintf(fd, "DockOrder = 0x%03x\n", DockOrder); + WriteOSSettings(fd); fclose(fd); } diff --git a/bochs/gui/enh_dbg.h b/bochs/gui/enh_dbg.h index c14c665f8..5ba108692 100644 --- a/bochs/gui/enh_dbg.h +++ b/bochs/gui/enh_dbg.h @@ -67,6 +67,8 @@ int GetNextSelectedLI(int listnum, int StartPt); bx_bool OSInit(); void SpecialInit(); void CloseDialog(); +bx_bool ParseOSSettings(const char *param, const char *value); +void WriteOSSettings(FILE *fd); void HitBreak(); void ParseIDText(const char *x); diff --git a/bochs/gui/gtk_enh_dbg_osdep.cc b/bochs/gui/gtk_enh_dbg_osdep.cc index 7b386c697..f505d77d5 100644 --- a/bochs/gui/gtk_enh_dbg_osdep.cc +++ b/bochs/gui/gtk_enh_dbg_osdep.cc @@ -2400,4 +2400,15 @@ void MakeBL(TreeParent *h_P, bx_param_c *p) } } +bx_bool ParseOSSettings(const char *param, const char *value) +{ + // TODO: handle GTK-specific settings here + return 0; +} + +void WriteOSSettings(FILE *fd) +{ + // TODO: handle GTK-specific settings here +} + #endif diff --git a/bochs/gui/win32_enh_dbg_osdep.cc b/bochs/gui/win32_enh_dbg_osdep.cc index b97236fd6..9083c6c61 100644 --- a/bochs/gui/win32_enh_dbg_osdep.cc +++ b/bochs/gui/win32_enh_dbg_osdep.cc @@ -1876,4 +1876,15 @@ void MakeBL(HTREEITEM *h_P, bx_param_c *p) } } +bx_bool ParseOSSettings(const char *param, const char *value) +{ + // TODO: handle win32-specific settings here + return 0; +} + +void WriteOSSettings(FILE *fd) +{ + // TODO: handle win32-specific settings here +} + #endif