[SDL] Strangle problem using keys

ALTAIR - altairdiv at hotmail.com
Tue Nov 1 11:36:27 PST 2005


If (keys[SDLK_UP]== 1)

is the same what:

If (keys[SDLK_UP])

>From: Martin Storsjö <martin at martin.st>
>Reply-To: "A list for developers using the SDL library. 
>(includesSDL-announce)" <sdl at libsdl.org>
>To: "A list for developers using the SDL library. (includes 
>SDL-announce)"<sdl at libsdl.org>
>Subject: Re: [SDL] Strangle problem using keys
>Date: Tue, 1 Nov 2005 19:08:32 +0200 (EET)
>
>On Tue, 1 Nov 2005, ALTAIR - wrote:
>
>>if (keys[SDLK_UP]== 1) { move_up(); }
>>if (keys[SDLK_DOWN]== 1) { move_down(); }
>>
>>Is this correct?. I am using SDL-1.2.8 (the stable version when all was 
>>installed). No errors when I compile on my Linux, but the key are not 
>>detected.
>
>I'd suggest trying
>
>if (keys[SDLK_UP])
>
>instead, since it could be any value except zero.
>
>// Martin
>
>_______________________________________________
>SDL mailing list
>SDL at libsdl.org
>http://www.libsdl.org/mailman/listinfo/sdl






More information about the SDL mailing list