]> Eric's Git Repo - ericdesktop.git/commitdiff
Fixed bug where scaling wasn't looking right
authorEric Wertz <ericdwertz@gmail.com>
Mon, 20 Feb 2017 16:32:10 +0000 (11:32 -0500)
committerEric Wertz <ericdwertz@gmail.com>
Mon, 20 Feb 2017 16:32:10 +0000 (11:32 -0500)
main.c

diff --git a/main.c b/main.c
index ea7afc21c66e7823199912e16daf87d51f6cf001..6f7d65f0e864d5049b956c8d3399416dc0d78b85 100644 (file)
--- a/main.c
+++ b/main.c
@@ -8,6 +8,7 @@
 #include <GL/glu.h>
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 
 GtkWidget* window;
@@ -134,7 +135,7 @@ void load_wallpaper_pixels(GdkPixbuf* pixbuf)
     float sw, sh;
     float targetheight = (float)width / aspect;
     float targetwidth = (float)height * aspect;
-    if( targetwidth >= screen_width )
+    if( targetwidth >= screen_width && targetwidth <= height )
     {
         //Scale width, crop height
         tx1 = 0.0f;
@@ -378,7 +379,27 @@ int main( int argc, char* argv[] )
     GSettingsSchema* gsettings_schema;
 
     gsettings_schema = g_settings_schema_source_lookup( g_settings_schema_source_get_default(),
-                                                "org.gnome.desktop.background",
+                             
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+                   "org.gnome.desktop.background",
                                                 TRUE );
     if( gsettings_schema )
     {