From 305e236e0b31734682dc4212ce5e66bfe278025f Mon Sep 17 00:00:00 2001 From: "Javier S. Pedro" Date: Sun, 27 Sep 2009 03:54:19 +0200 Subject: [PATCH] gconf settings for scaler --- debian/changelog | 5 ++++- platform/hgw.cpp | 14 ++++++++++++++ platform/hgw.h | 3 +++ platform/sdlv.cpp | 9 ++++++++- 4 files changed, 29 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index bbbc4d4..ac1544f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,11 @@ drnoksnes (1.1.2) unstable; urgency=low * More fixes to fremantle gui. + * Multiple scales support. + * Basic 2x software scaler. + * Basic drawing of onscreen controls. - -- Javier S. Pedro Mon, 21 Sep 2009 22:55:31 +0200 + -- Javier S. Pedro Sun, 27 Sep 2009 03:31:30 +0200 drnoksnes (1.1.1) unstable; urgency=low diff --git a/platform/hgw.cpp b/platform/hgw.cpp index a690176..ef5799a 100644 --- a/platform/hgw.cpp +++ b/platform/hgw.cpp @@ -85,11 +85,25 @@ void HgwConfig() Settings.Transparency = transparency ? TRUE : FALSE; } + char scaler[256]; + scaler[0] = '\0'; + if (hgw_conf_request_string(hgw, kGConfScaler, scaler) == HGW_ERR_NONE) { + if (strlen(scaler) > 0) { + free(Config.scaler); + Config.scaler = strdup(scaler); + } + } + char displayFramerate = FALSE; if (hgw_conf_request_bool(hgw, kGConfDisplayFramerate, &displayFramerate) == HGW_ERR_NONE) { Settings.DisplayFrameRate = displayFramerate ? TRUE : FALSE; } + char displayControls = FALSE; + if (hgw_conf_request_bool(hgw, kGConfDisplayControls, &displayControls) == HGW_ERR_NONE) { + Config.touchscreenShow = displayControls ? true : false; + } + int speedhacks = 0; if (hgw_conf_request_int(hgw, kGConfSpeedhacks, &speedhacks) == HGW_ERR_NONE) { if (speedhacks <= 0) { diff --git a/platform/hgw.h b/platform/hgw.h index 6c5ea56..07c7d37 100644 --- a/platform/hgw.h +++ b/platform/hgw.h @@ -21,10 +21,13 @@ void HgwPollEvents(); #define kGConfTurboMode kGConfPath "/" "turbo" #define kGConfFrameskip kGConfPath "/" "frameskip" #define kGConfTransparency kGConfPath "/" "transparency" +#define kGConfScaler kGConfPath "/" "scaler" #define kGConfDisplayFramerate kGConfPath "/" "display-framerate" +#define kGConfDisplayControls kGConfPath "/" "display-controls" #define kGConfSpeedhacks kGConfPath "/" "speedhacks" #define kGConfMapping kGConfPath "/" "mapping" #define kGConfKeysPath kGConfPath "/" "keys" + #endif diff --git a/platform/sdlv.cpp b/platform/sdlv.cpp index f9732d2..8ccb574 100644 --- a/platform/sdlv.cpp +++ b/platform/sdlv.cpp @@ -345,7 +345,14 @@ static const ScalerFactory* searchForScaler(int w, int h) const int n = sizeof(scalers) / sizeof(ScalerFactory*); int i; - if (Config.scaler) { + if (Config.scaler && strcasecmp(Config.scaler, "help") == 0 ) { + // List scalers + printf("Scalers list:\n"); + for (i = 0; i < n; i++) { + printf(" %s\n", scalers[i]->getName()); + } + DIE("End of scalers list"); + } else if (Config.scaler && strcasecmp(Config.scaler, "auto") != 0 ) { // We prefer a specific scaler for (i = 0; i < n; i++) { if (strcasecmp(scalers[i]->getName(), Config.scaler) == 0) { -- 1.7.9.5