r385 - packages/ppracer/trunk/debian/patches

Alexander Schmehl tolimar-guest at costa.debian.org
Thu Mar 30 01:58:26 UTC 2006


Author: tolimar-guest
Date: 2006-03-30 01:58:25 +0000 (Thu, 30 Mar 2006)
New Revision: 385

Added:
   packages/ppracer/trunk/debian/patches/30_G++4.1-fix.dpatch
   packages/ppracer/trunk/debian/patches/40_fix_keyboard_config.dpatch
Log:
ppracer: adding missing patches to svn

Added: packages/ppracer/trunk/debian/patches/30_G++4.1-fix.dpatch
===================================================================
--- packages/ppracer/trunk/debian/patches/30_G++4.1-fix.dpatch	2006-03-30 01:55:38 UTC (rev 384)
+++ packages/ppracer/trunk/debian/patches/30_G++4.1-fix.dpatch	2006-03-30 01:58:25 UTC (rev 385)
@@ -0,0 +1,19 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## G++4.1-fix.dpatch by  Martin Michlmayr <tbm at cyrius.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: This fixes a FTBFS with g++ 4.1
+
+ at DPATCH@
+diff -urNad ppracer-0.3.1~/src/ppgltk/FT/FTTextureGlyph.h ppracer-0.3.1/src/ppgltk/FT/FTTextureGlyph.h
+--- ppracer-0.3.1~/src/ppgltk/FT/FTTextureGlyph.h	2005-02-18 11:16:04.000000000 +0100
++++ ppracer-0.3.1/src/ppgltk/FT/FTTextureGlyph.h	2006-03-30 02:11:04.000000000 +0200
+@@ -52,7 +52,7 @@
+          * Reset the currently active texture to zero to get into a known state before
+          * drawing a string. This is to get round possible threading issues.
+          */
+-        static void FTTextureGlyph::ResetActiveTexture(){ activeTextureID = 0;}
++        static void ResetActiveTexture(){ activeTextureID = 0;}
+         
+     private:
+         /**

Added: packages/ppracer/trunk/debian/patches/40_fix_keyboard_config.dpatch
===================================================================
--- packages/ppracer/trunk/debian/patches/40_fix_keyboard_config.dpatch	2006-03-30 01:55:38 UTC (rev 384)
+++ packages/ppracer/trunk/debian/patches/40_fix_keyboard_config.dpatch	2006-03-30 01:58:25 UTC (rev 385)
@@ -0,0 +1,167 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 30_fix_keyboard_config.dpatch by Stefan Potyra <sistpoty at ubuntu.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: backported keyboardconfig.cpp from the unstable release, because
+## DP: otherwise you can't configure the keyboard to use arrow keys.
+
+ at DPATCH@
+diff -urNad ppracer-0.3.1~/src/keyboardconfig.cpp ppracer-0.3.1/src/keyboardconfig.cpp
+--- ppracer-0.3.1~/src/keyboardconfig.cpp	2005-02-18 11:15:44.000000000 +0100
++++ ppracer-0.3.1/src/keyboardconfig.cpp	2006-03-25 01:09:52.000000000 +0100
+@@ -25,14 +25,17 @@
+ 	
+ struct KeyMap{
+ 	SDLKey key;
+-	char string[10];
++	const char *string;
+ };
+ 
+ static KeyMap keymap[] = {
+-	{SDLK_LEFT,"left"},
+-	{SDLK_RIGHT,"right"},
+-	{SDLK_UP,"up"},
+-	{SDLK_DOWN,"down"},
++	{SDLK_BACKSPACE,"backspace"},
++	{SDLK_TAB,"tab"},
++	{SDLK_CLEAR,"clear"},
++	{SDLK_PAUSE,"pause"},
++	{SDLK_SPACE,"space"},
++	{SDLK_DELETE,"delete"},
++		
+ 	{SDLK_KP0,"keypad 0"},
+ 	{SDLK_KP1,"keypad 1"},
+ 	{SDLK_KP2,"keypad 2"},
+@@ -46,12 +49,61 @@
+ 	{SDLK_KP_PERIOD,"keypad ."},
+ 	{SDLK_KP_DIVIDE,"keypad /"},
+ 	{SDLK_KP_MULTIPLY,"keypad *"},
+-	{SDLK_KP_MINUS,"keypad m"},
++	{SDLK_KP_MINUS,"keypad -"},
+ 	{SDLK_KP_PLUS,"keypad +"},
+-	{SDLK_KP_EQUALS,"keypad ="}	
+-};
++	{SDLK_KP_EQUALS,"keypad ="},
++	{SDLK_KP_ENTER,"keypad enter"},
+ 
++	{SDLK_LEFT,"left"},
++	{SDLK_RIGHT,"right"},
++	{SDLK_UP,"up"},
++	{SDLK_DOWN,"down"},
++	
++	{SDLK_INSERT,"insert"},
++	{SDLK_HOME,"home"},
++	{SDLK_END,"end"},
++	{SDLK_PAGEUP,"page up"},
++	{SDLK_PAGEDOWN,"page down"},
+ 	
++	{SDLK_F1,"F1"},
++	{SDLK_F2,"F2"},
++	{SDLK_F3,"F3"},
++	{SDLK_F4,"F4"},
++	{SDLK_F5,"F5"},
++	{SDLK_F6,"F6"},
++	{SDLK_F7,"F7"},
++	{SDLK_F8,"F8"},
++	{SDLK_F9,"F9"},
++	{SDLK_F10,"F10"},
++	{SDLK_F11,"F11"},
++	{SDLK_F12,"F12"},
++	{SDLK_F13,"F13"},
++	{SDLK_F14,"F14"},
++	{SDLK_F15,"F15"},
++	
++	{SDLK_NUMLOCK,"numlock"},
++	{SDLK_CAPSLOCK,"capslock"},
++	{SDLK_SCROLLOCK,"scrollock"},
++	{SDLK_RSHIFT,"right shift"},
++	{SDLK_LSHIFT,"left shift"},
++	{SDLK_RCTRL,"right ctrl"},
++	{SDLK_LCTRL,"left ctrl"},
++	{SDLK_RALT,"right alt"},
++	{SDLK_LALT,"left alt"},
++	{SDLK_RMETA,"right meta"},
++	{SDLK_LMETA,"left meta"},
++	{SDLK_LSUPER,"left windows key"},
++	{SDLK_RSUPER,"right windows key"},
++	{SDLK_MODE,"mode shift"},
++	{SDLK_HELP,"help"},
++	{SDLK_PRINT,"print-screen"},
++	{SDLK_SYSREQ,"SysRq"},
++	{SDLK_BREAK,"break"},
++	{SDLK_MENU,"menu"},
++	{SDLK_POWER,"power"},
++	{SDLK_EURO,"euro"}	
++};
++
+ 	
+ KeyboardConfig::KeyboardConfig()
+ {
+@@ -172,33 +224,31 @@
+ void
+ KeyboardConfig::setKey(pp::Entry* widget, SDLKey key)
+ {
+-	std::string content="";
+-	
+-	if(key==SDLK_BACKSPACE){
+-		widget->setContent(content);
+-		return;
+-	}else{
+-		content = getKey(key);
+-	}
+-	
+-	if (content!=""){
+-		widget->setContent(content);
+-	}
++	widget->setContent(getKey(key));
+ }
+ 
+ std::string KeyboardConfig::getKey(SDLKey key)
+ {
+-	std::string content="";
+-	if(isalnum(key)){
+-		content=key;
+-	}else{
+-		for(unsigned int i=0;i<sizeof(keymap)/sizeof(KeyMap);i++){
+-			if(key==keymap[i].key){
+-				content=keymap[i].string;
+-				break;
+-			}
++	std::string content;
++	
++	for(unsigned int i=0;i<sizeof(keymap)/sizeof(KeyMap);i++){
++		if(key==keymap[i].key){
++			content=keymap[i].string;
++			break;
+ 		}
+ 	}
++		
++	if(content.empty()){
++		if(isprint(key)){
++			content=key;
++		}else{
++			char temp[10];
++			sprintf(temp,"%d",key);
++			content = "key ";
++			content += temp;
++		}
++	}
++	
+ 	return content;
+ }
+ 
+@@ -211,6 +261,14 @@
+ 				return keymap[i].key;
+ 			}
+ 		}
++		
++		if(string.length()>5){
++			if(!strncmp("key ",string.c_str(),4)){
++				int key = atoi(string.c_str()+4);
++				return SDLKey(key);				
++			}
++		}
++		
+ 		return SDLKey(string.c_str()[0]);		
+ 	}else{
+ 		return SDLKey(0);




More information about the Pkg-games-devel mailing list