summaryrefslogtreecommitdiff
path: root/dgclock/patches
diff options
context:
space:
mode:
Diffstat (limited to 'dgclock/patches')
-rw-r--r--dgclock/patches/001-use-dejavu-font.patch17
-rw-r--r--dgclock/patches/002-fix-bpp-on-nn.patch47
2 files changed, 64 insertions, 0 deletions
diff --git a/dgclock/patches/001-use-dejavu-font.patch b/dgclock/patches/001-use-dejavu-font.patch
new file mode 100644
index 0000000..4e58e44
--- /dev/null
+++ b/dgclock/patches/001-use-dejavu-font.patch
@@ -0,0 +1,17 @@
+diff -ruN dgclock/src/main.c dgclock.mod/src/main.c
+--- dgclock/src/main.c 2009-12-21 16:00:00.000000000 +0100
++++ dgclock.mod/src/main.c 2010-02-10 11:30:11.000000000 +0100
+@@ -60,11 +60,11 @@
+
+ SDL_ShowCursor(SDL_DISABLE);
+
+- gTTFFont = TTF_OpenFont ( "mplus-2p-medium.ttf" , 15 );
++ gTTFFont = TTF_OpenFont ( "/usr/share/fonts/ttf-dejavu/DejaVuSans.ttf" , 15 );
+ if (!gTTFFont)
+ return -1;
+
+- gTTFSmall = TTF_OpenFont ( "mplus-2p-medium.ttf" , 10 );
++ gTTFSmall = TTF_OpenFont ( "/usr/share/fonts/ttf-dejavu/DejaVuSans.ttf" , 10 );
+ if (!gTTFSmall)
+ return -1;
+
diff --git a/dgclock/patches/002-fix-bpp-on-nn.patch b/dgclock/patches/002-fix-bpp-on-nn.patch
new file mode 100644
index 0000000..5c3ff70
--- /dev/null
+++ b/dgclock/patches/002-fix-bpp-on-nn.patch
@@ -0,0 +1,47 @@
+diff -ruN dgclock-091222/src/main.c dgclock-091222.mod/src/main.c
+--- dgclock-091222/src/main.c 2010-02-10 11:51:51.000000000 +0100
++++ dgclock-091222.mod/src/main.c 2010-02-10 15:27:40.000000000 +0100
+@@ -7,7 +7,7 @@
+ #include "text.h"
+ #include "settime.h"
+
+-SDL_Surface *gSurfaceMain = NULL;
++SDL_Surface *gSurfaceMain, *gRealScreen = NULL;
+ TTF_Font *gTTFFont = NULL;
+ TTF_Font *gTTFSmall = NULL;
+
+@@ -46,8 +46,9 @@
+ return -1;
+ }
+
+- gSurfaceMain = SDL_SetVideoMode(320,240,16,0);
+-
++ gSurfaceMain = SDL_CreateRGBSurface(SDL_SWSURFACE, 320, 240, 16, 0, 0, 0, 0);
++ gRealScreen = SDL_SetVideoMode(320,240,32,0);
++
+ if (!gSurfaceMain)
+ return -1;
+
+@@ -560,7 +561,8 @@
+ SDL_Surface *pSurfaceText = NULL;
+
+
+- SDL_Flip(gSurfaceMain);
++ SDL_BlitSurface(gSurfaceMain,NULL,gRealScreen,NULL);
++ SDL_Flip(gRealScreen);
+
+ i = 0;
+ quit_flag = 0;
+@@ -612,8 +614,10 @@
+ app_make_time(&lctm);
+ }
+
+- SDL_Flip(gSurfaceMain);
+- SDL_Flip(gSurfaceMain); // seems double buffer
++ SDL_BlitSurface(gSurfaceMain,NULL,gRealScreen,NULL);
++ SDL_Flip(gRealScreen);
++ SDL_Flip(gRealScreen);
++
+ update_flag = 0;
+ }
+