comparison mde/input/joystick.d @ 24:32eff0e01c05

Only locally-changed options are stored in user-config now. Log levels revised. Options sub-classes are handled more generically and can be added without changing the Options class. Options changed at run-time are tracked, and on exit merged with user options and saved. Revised log levels as set out in policies.txt and as used in code. committer: Diggory Hardy <diggory.hardy@gmail.com>
author Diggory Hardy <diggory.hardy@gmail.com>
date Thu, 27 Mar 2008 16:15:21 +0000
parents 5f90774ea1ef
children 611f7b9063c6
comparison
equal deleted inserted replaced
23:47478557428d 24:32eff0e01c05
39 joysticks = new SDL_Joystick*[SDL_NumJoysticks ()]; 39 joysticks = new SDL_Joystick*[SDL_NumJoysticks ()];
40 char tmp[128] = void; 40 char tmp[128] = void;
41 41
42 for (int i = 0; i < joysticks.length; ++i) { 42 for (int i = 0; i < joysticks.length; ++i) {
43 if ((joysticks[i] = SDL_JoystickOpen (i)) is null) { // null on failure 43 if ((joysticks[i] = SDL_JoystickOpen (i)) is null) { // null on failure
44 logger.warn (logger.format (tmp, "Unable to open joystick {} via SDL", i)); 44 logger.error (logger.format (tmp, "Unable to open joystick {} via SDL", i));
45 } 45 }
46 } 46 }
47 47
48 logger.info (logger.format (tmp, "Opened {} joysticks via SDL, succesfully unless preceding warnings say otherwise.", joysticks.length)); 48 logger.info (logger.format (tmp, "Opened {} joysticks via SDL, succesfully unless preceding warnings say otherwise.", joysticks.length));
49 } 49 }