Rogue Class Linux Download Login

Artifact Content

Artifact 00f2e3efe8ff82db8fb5f4b2bd3e7c75954c2d25:


--- brogue-1.7.3/src/jice-libtcod-5e9e80fdaefa/src/sys_sdl12_c.c.orig	2013-10-12 14:07:13.758100458 -0700
+++ brogue-1.7.3/src/jice-libtcod-5e9e80fdaefa/src/sys_sdl12_c.c	2013-10-12 15:06:09.471374811 -0700
@@ -26,6 +26,8 @@
 */
 #include "libtcod.h"
 #include "libtcod_int.h"
+#include "libvjk.h"
+extern vkbd *kbd;
 
 static void get_closest_mode(int *w, int *h) {
 	int i;
@@ -60,6 +62,7 @@
 		if ( TCOD_ctx.sdl_cbk ) {
 			TCOD_ctx.sdl_cbk((void *)screen);
 		}
+		vkbdBlitGraphics(kbd);
 		SDL_Flip(screen);
 	}
 #ifndef NO_OPENGL
@@ -162,9 +165,9 @@
 }
 
 static void set_fullscreen(bool fullscreen) {
+	SDL_Surface *newscreen;
 	bool mouseOn=SDL_ShowCursor(-1);
 	if ( fullscreen ) {
-		SDL_Surface *newscreen;
 		find_resolution();
 		newscreen=SDL_SetVideoMode(TCOD_ctx.actual_fullscreen_width,TCOD_ctx.actual_fullscreen_height,32,SDL_FULLSCREEN);
 		TCOD_IFNOT ( newscreen != NULL ) return;
@@ -174,13 +177,16 @@
 		TCOD_ctx.actual_fullscreen_height=screen->h;
 		TCOD_sys_init_screen_offset();
 	} else {
-		SDL_Surface *newscreen=SDL_SetVideoMode(TCOD_ctx.root->w*TCOD_ctx.font_width,TCOD_ctx.root->h*TCOD_ctx.font_height,32,0);
+		newscreen=SDL_SetVideoMode(TCOD_ctx.root->w*TCOD_ctx.font_width,TCOD_ctx.root->h*TCOD_ctx.font_height,32,0);
 		TCOD_IFNOT( newscreen != NULL ) return;
 		screen=newscreen;
 		SDL_ShowCursor(mouseOn ? 1:0);
 		TCOD_ctx.fullscreen_offsetx=0;
 		TCOD_ctx.fullscreen_offsety=0;
 	}
+	if (kbd != NULL) {
+		kbd->win = newscreen;
+	}
 	TCOD_ctx.fullscreen=fullscreen;
 	oldFade=-1; /* to redraw the whole screen */
 	SDL_UpdateRect(screen, 0, 0, 0, 0);