gconf settings for scaler
authorJavier S. Pedro <maemo@javispedro.com>
Sun, 27 Sep 2009 01:54:19 +0000 (03:54 +0200)
committerJavier S. Pedro <maemo@javispedro.com>
Sun, 27 Sep 2009 01:54:19 +0000 (03:54 +0200)
debian/changelog
platform/hgw.cpp
platform/hgw.h
platform/sdlv.cpp

index bbbc4d4..ac1544f 100644 (file)
@@ -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 <maemo@javispedro.com>  Mon, 21 Sep 2009 22:55:31 +0200
+ -- Javier S. Pedro <maemo@javispedro.com>  Sun, 27 Sep 2009 03:31:30 +0200
 
 drnoksnes (1.1.1) unstable; urgency=low
 
index a690176..ef5799a 100644 (file)
@@ -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) {
index 6c5ea56..07c7d37 100644 (file)
@@ -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
 
index f9732d2..8ccb574 100644 (file)
@@ -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) {