Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
DISCONTINUED:openSUSE:11.1:Update
psx-plugins
joystick.dif
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File joystick.dif of Package psx-plugins
--- Makefile +++ Makefile @@ -2,7 +2,7 @@ VERSION = 1 BUILD = 1 PLUGIN = libjoypadXwin-${VERSION}.${BUILD}.so -CFLAGS = -fPIC -Wall -O2 -fomit-frame-pointer +CFLAGS = -fPIC -Wall $(RPM_OPT_FLAGS) -fomit-frame-pointer OBJECTS = pad.o LIBS = $(shell gtk-config --libs) CFLAGS += $(shell gtk-config --cflags) -DVERSION=${VERSION} -DBUILD=${BUILD} @@ -12,7 +12,6 @@ plugin: ${OBJECTS} rm -f ${PLUGIN} gcc -shared -Wl,-soname,${PLUGIN} ${CFLAGS} ${OBJECTS} -o ${PLUGIN} ${LIBS} - strip --strip-unneeded --strip-debug ${PLUGIN} clean: rm -f *.o *.so --- pad.c +++ pad.c @@ -101,8 +101,8 @@ long PADinit(long flags) { PadFlags|=flags; //Load Defualts then overwrite with custom controls! - strcpy(js_pad.js_buffer,"/dev/js0"); - strcpy(js_pad2.js_buffer,"NULL"); + strcpy(js_pad.js_buffer,"/dev/input/js0"); + strcpy(js_pad2.js_buffer,"/dev/input/js1"); js_pad.pad_cross=1; js_pad.pad_square=0; js_pad.pad_circle=2; @@ -261,8 +261,8 @@ }else if(js.value < 0) { Stat&=~(1<<4); }else if(js.value == 0) { - Stat|=~(1<<6); - Stat|=~(1<<4); + Stat|=(1<<6); + Stat|=(1<<4); } break; @@ -272,8 +272,8 @@ }else if(js.value < 0) { Stat&=~(1<<7); }else if(js.value == 0) { - Stat|=~(1<<5); - Stat|=~(1<<7); + Stat|=(1<<5); + Stat|=(1<<7); } break; } @@ -424,8 +424,8 @@ static int cfgexit; GtkWidget *window1; - GtkWidget *entry1; - GtkWidget *entry2; + GtkWidget *entry1=NULL; + GtkWidget *entry2=NULL; long PADconfigure(void) { GtkWidget *fixed1; @@ -948,7 +948,7 @@ gtk_fixed_put (GTK_FIXED (fixed5), entry1, 8, 32); gtk_widget_set_uposition (entry1, 8, 32); gtk_widget_set_usize (entry1, 120, 21); - gtk_entry_set_text (GTK_ENTRY (entry1), "/dev/js0"); + gtk_entry_set_text (GTK_ENTRY (entry1), "/dev/input/js0"); hseparator1 = gtk_hseparator_new (); gtk_widget_ref (hseparator1); @@ -985,7 +985,7 @@ gtk_fixed_put (GTK_FIXED (fixed5), entry2, 8, 96); gtk_widget_set_uposition (entry2, 8, 96); gtk_widget_set_usize (entry2, 120, 21); - gtk_entry_set_text (GTK_ENTRY (entry2), "NULL"); + gtk_entry_set_text (GTK_ENTRY (entry2), "/dev/input/js1"); hseparator2 = gtk_hseparator_new (); gtk_widget_ref (hseparator2); @@ -1134,6 +1134,7 @@ } void JoyStickLoad() { + if(!strlen(js_pad.js_buffer) && entry1) strcpy(js_pad.js_buffer,gtk_entry_get_text(GTK_ENTRY (entry1))); if((fd = open(js_pad.js_buffer, O_NONBLOCK))==-1) { printf("Error: Loading JoyStick Buffer (%s)(pad 1)\n",js_pad.js_buffer); } @@ -1143,6 +1144,7 @@ void JoyStickLoad2() { if(js2_support==1) { + if(!strlen(js_pad2.js_buffer) && entry2) strcpy(js_pad2.js_buffer,gtk_entry_get_text(GTK_ENTRY (entry2))); if((fd2 = open(js_pad2.js_buffer, O_NONBLOCK))==-1) { printf("Error: Loading JoyStick Buffer (%s)(pad 2)\n",js_pad2.js_buffer);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor