src/joystick/mint/SDL_sysjoystick.c
changeset 1054 e89d7f826b4a
parent 963 92c247cec42d
child 1079 39b5606fa543
equal deleted inserted replaced
1053:f596fa4f17a6 1054:e89d7f826b4a
    81 
    81 
    82 enum {
    82 enum {
    83 	MCH_ST=0,
    83 	MCH_ST=0,
    84 	MCH_STE,
    84 	MCH_STE,
    85 	MCH_TT,
    85 	MCH_TT,
    86 	MCH_F30
    86 	MCH_F30,
       
    87 	MCH_ARANYM
    87 };
    88 };
    88 
    89 
    89 /*	Joypad buttons
    90 /*	Joypad buttons
    90  *		Procontroller note:
    91  *		Procontroller note:
    91  *			L,R are connected to 4,6
    92  *			L,R are connected to 4,6
   180 		cookie_mch = MCH_ST << 16;
   181 		cookie_mch = MCH_ST << 16;
   181 	}
   182 	}
   182 
   183 
   183 	/* Enable some default joysticks */
   184 	/* Enable some default joysticks */
   184 	if ((cookie_mch == MCH_ST<<16) || ((cookie_mch>>16) == MCH_STE) ||
   185 	if ((cookie_mch == MCH_ST<<16) || ((cookie_mch>>16) == MCH_STE) ||
   185 		(cookie_mch == MCH_TT<<16) || (cookie_mch == MCH_F30<<16)) {
   186 		(cookie_mch == MCH_TT<<16) || (cookie_mch == MCH_F30<<16) ||
       
   187 		(cookie_mch == MCH_ARANYM<<16)) {
   186 		atarijoysticks[IKBD_JOY1].enabled=(SDL_AtariIkbd_enabled!=0);
   188 		atarijoysticks[IKBD_JOY1].enabled=(SDL_AtariIkbd_enabled!=0);
   187 	}
   189 	}
   188 	if ((cookie_mch == MCH_STE<<16) || (cookie_mch == MCH_F30<<16)) {
   190 	if ((cookie_mch == MCH_STE<<16) || (cookie_mch == MCH_F30<<16)) {
   189 		atarijoysticks[PORTA_PAD].enabled=SDL_TRUE;
   191 		atarijoysticks[PORTA_PAD].enabled=SDL_TRUE;
   190 		atarijoysticks[PORTB_PAD].enabled=SDL_TRUE;
   192 		atarijoysticks[PORTB_PAD].enabled=SDL_TRUE;
   195 
   197 
   196 	/* Read environment for joysticks to enable */
   198 	/* Read environment for joysticks to enable */
   197 	if (envr) {
   199 	if (envr) {
   198 		/* IKBD on any Atari, maybe clones */
   200 		/* IKBD on any Atari, maybe clones */
   199 		if ((cookie_mch == MCH_ST<<16) || ((cookie_mch>>16) == MCH_STE) ||
   201 		if ((cookie_mch == MCH_ST<<16) || ((cookie_mch>>16) == MCH_STE) ||
   200 			(cookie_mch == MCH_TT<<16) || (cookie_mch == MCH_F30<<16)) {
   202 			(cookie_mch == MCH_TT<<16) || (cookie_mch == MCH_F30<<16) ||
       
   203 			(cookie_mch == MCH_ARANYM<<16)) {
   201 			if (SDL_AtariIkbd_enabled!=0) {
   204 			if (SDL_AtariIkbd_enabled!=0) {
   202 				TEST_JOY_ENABLED(envr, "ikbd-joy1", IKBD_JOY1);
   205 				TEST_JOY_ENABLED(envr, "ikbd-joy1", IKBD_JOY1);
   203 			}
   206 			}
   204 		}
   207 		}
   205 		/* Joypads ports only on STE and Falcon */
   208 		/* Joypads ports only on STE and Falcon */