annotate src/power/nds/SDL_syspower.c @ 4920:a4032241deb5

Fixed massive stack memory usage in the gesture functions
author Sam Lantinga <slouken@libsdl.org>
date Tue, 30 Nov 2010 18:07:31 -0800
parents f7b03b6838cb
children b530ef003506
rev   line source
3170
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
1 /*
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
2 SDL - Simple DirectMedia Layer
3697
f7b03b6838cb Fixed bug #926
Sam Lantinga <slouken@libsdl.org>
parents: 3186
diff changeset
3 Copyright (C) 1997-2010 Sam Lantinga
3170
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
4
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
5 This library is free software; you can redistribute it and/or
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
6 modify it under the terms of the GNU Lesser General Public
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
7 License as published by the Free Software Foundation; either
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
8 version 2.1 of the License, or (at your option) any later version.
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
9
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
10 This library is distributed in the hope that it will be useful,
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
13 Lesser General Public License for more details.
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
14
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
15 You should have received a copy of the GNU Lesser General Public
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
16 License along with this library; if not, write to the Free Software
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
18
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
19 Sam Lantinga
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
20 slouken@libsdl.org
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
21 */
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
22 #include "SDL_config.h"
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
23
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
24 #ifndef SDL_POWER_DISABLED
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
25 #ifdef SDL_POWER_NINTENDODS
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
26
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
27 #include "SDL_power.h"
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
28
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
29 SDL_bool
3186
Sam Lantinga <slouken@libsdl.org>
parents: 3170
diff changeset
30 SDL_GetPowerInfo_NintendoDS(SDL_PowerState * state, int *seconds,
Sam Lantinga <slouken@libsdl.org>
parents: 3170
diff changeset
31 int *percent)
3170
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
32 {
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
33 /* !!! FIXME: write me. */
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
34
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
35 *state = SDL_POWERSTATE_UNKNOWN;
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
36 *percent = -1;
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
37 *seconds = -1;
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
38
3186
Sam Lantinga <slouken@libsdl.org>
parents: 3170
diff changeset
39 return SDL_TRUE; /* always the definitive answer on Nintendo DS. */
3170
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
40 }
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
41
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
42 #endif /* SDL_POWER_NINTENDODS */
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
43 #endif /* SDL_POWER_DISABLED */
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
44
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
45 /* vi: set ts=4 sw=4 expandtab: */