# HG changeset patch
# User Sam Lantinga SDL_Init(SDL_INIT_VIDEO);
-Interally, SDL stores all the events waiting to be handled in an event queue. Using functions like — Enable/disable joystick event polling SDL_InitSubSystem. ). SDL_Init must be called before any other SDL function. It automatically initializes the Event Handling, File I/O and Threading subsystems and it takes a parameter specifying which other subsystems to initialize. So, to initialize the default subsystems and the Video subsystems you would call:
diff -r 578815880307 -r e5bc29de3f0a docs/html/guidecdromexamples.html
--- a/docs/html/guidecdromexamples.html Thu Sep 13 16:41:03 2001 +0000
+++ b/docs/html/guidecdromexamples.html Fri Sep 14 02:41:09 2001 +0000
@@ -201,7 +201,7 @@
// Play first and second track and 10 seconds of third track:
if ( CD_INDRIVE(SDL_CDStatus(cdrom)) )
- SDL_CDPlayTracks(cdrom, 0, 0, 2, 10); That takes care of the controls that you can count on being on every joystick under the sun, but there are a few extra things that SDL can support. Joyballs are next on our list, they are alot like axis we a few minor differences. Joyballs store relative changes unlike the the absolute postion stored in a axis event. Also one trackball event contains both the change in x and they change in y. Our case for it is as follows:Introduction
SDL_PumpEvents Pumps the event loop, gathering events from the input devices SDL_PeepEvents Checks the event queue for messages and optionally returns them SDL_PollEvent Polls for currently pending events SDL_WaitEvent Waits indefinitely for the next available event SDL_PushEvent Pushes an event onto the event queue SDL_SetEventFilter Sets up a filter to process all events SDL_EventState Allows you to set the state of processing certain events SDL_GetKeyState Get a snapshot of the current keyboard state SDL_GetModState Get the state of modifier keys SDL_SetModState Set the state of modifier keys SDL_GetKeyName Get the name of an SDL virtual keysym SDL_EnableUNICODE Enable UNICODE translation SDL_EnableKeyRepeat Set keyboard repeat rate SDL_GetMouseState Retrieve the current state of the mouse SDL_GetRelativeMouseState Retrieve the current state of the mouse SDL_GetAppState Get the state of the application SDL_JoystickEventState Enable/disable joystick event polling
#include "SDL.h"#include "SDL/SDL.h"