Mercurial > sdl-ios-xcode
annotate src/power/os2/SDL_syspower.c @ 3170:b7a48f533966
Initial work on power subsystem for SDL 1.3.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Sun, 07 Jun 2009 06:06:35 +0000 |
parents | |
children | 51750b7a966f |
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 |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
3 Copyright (C) 1997-2009 Sam Lantinga |
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 /* !!! FIXME: |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
25 * Please note that this code has not been tested (or even compiled!). It |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
26 * should, in theory, run on any version of OS/2, and work with any system |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
27 * that has APM.SYS loaded. I don't know if ACPI.SYS works. |
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 |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
30 #ifndef SDL_POWER_DISABLED |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
31 #ifdef SDL_POWER_OS2 |
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 #define INCL_DOSFILEMGR |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
34 #define INCL_DOSDEVICES |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
35 #define INCL_DOSDEVIOCTL |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
36 #define INCL_DOSERRORS |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
37 #include <os2.h> |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
38 |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
39 #include "SDL_power.h" |
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 typedef struct { |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
42 USHORT len; |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
43 USHORT flags; |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
44 UCHAR ac_status; |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
45 UCHAR battery_status; |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
46 UCHAR battery_life; |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
47 UCHAR battery_time_form; |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
48 USHORT battery_time; |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
49 UCHAR battery_flags; |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
50 } PowerStatus; |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
51 extern int CompilerAssertPowerStatus[(sizeof (PowerStatus) == 10) ? 1 : -1]; |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
52 |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
53 |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
54 SDL_bool |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
55 SDL_GetPowerInfo_OS2(SDL_PowerState *state, int *seconds, int *percent) |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
56 { |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
57 PowerStatus status; |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
58 HFILE hfile = 0; |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
59 ULONG action = 0; |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
60 APIRET rc = 0; |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
61 |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
62 *state = SDL_POWERSTATE_UNKNOWN; |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
63 *percent = -1; |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
64 *seconds = -1; |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
65 |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
66 /* open the power management device */ |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
67 rc = DosOpen("APM$", &hfile, &action, 0, FILE_NORMAL, FILE_OPEN, |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
68 OPEN_ACCESS_READONLY | OPEN_SHARE_DENYNONE, 0); |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
69 |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
70 if (rc == NO_ERROR) { |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
71 USHORT iorc = 0; |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
72 ULONG iorclen = sizeof (iorc); |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
73 ULONG statuslen = sizeof (status); |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
74 |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
75 SDL_memset(&status, '\0', sizeof (status)); |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
76 status.len = sizeof (status); |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
77 |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
78 rc = DosDevIOCtl(hfile, IOCTL_POWER, POWER_GETPOWERSTATUS, &status, |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
79 statuslen, &statuslen, &iorc, iorclen, &iorclen); |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
80 DosClose(hfile); |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
81 |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
82 /* (status.flags & 0x1) == power subsystem enabled. */ |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
83 if ((rc == NO_ERROR) && (status.flags & 0x1)) { |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
84 if (statuslen == 7) { /* older OS/2 APM driver? Less fields. */ |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
85 status.battery_time_form = 0xFF; |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
86 status.battery_time = 0; |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
87 if (status.battery_status == 0xFF) { |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
88 status.battery_flags = 0xFF; |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
89 } else { |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
90 status.battery_flags = (1 << status.battery_status); |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
91 } |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
92 } |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
93 |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
94 if (status.battery_flags == 0xFF) { /* unknown state */ |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
95 *state = SDL_POWERSTATE_UNKNOWN; |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
96 } else if (status.battery_flags & (1 << 7)) { /* no battery */ |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
97 *state = SDL_POWERSTATE_NO_BATTERY; |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
98 } else if (status.battery_flags & (1 << 3)) { /* charging */ |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
99 *state = SDL_POWERSTATE_CHARGING; |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
100 need_details = SDL_TRUE; |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
101 } else if (status.ac_status == 1) { |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
102 *state = SDL_POWERSTATE_CHARGED; /* on AC, not charging. */ |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
103 need_details = SDL_TRUE; |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
104 } else { |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
105 *state = SDL_POWERSTATE_ON_BATTERY; /* not on AC. */ |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
106 need_details = SDL_TRUE; |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
107 } |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
108 |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
109 if (need_details) { |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
110 const int pct = (int) status.battery_life; |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
111 const int secs = (int) status.battery_time; |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
112 |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
113 if (pct != 0xFF) { /* 255 == unknown */ |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
114 *percent = (pct > 100) ? 100 : pct; |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
115 } |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
116 |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
117 if (status.battery_time_form == 0xFF) { /* unknown */ |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
118 *seconds = -1; |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
119 } else if (status.battery_time_form == 1) { /* minutes */ |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
120 *seconds = secs * 60; |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
121 } else { |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
122 *seconds = secs; |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
123 } |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
124 } |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
125 } |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
126 } |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
127 |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
128 return SDL_TRUE; /* always the definitive answer on OS/2. */ |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
129 } |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
130 |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
131 #endif /* SDL_POWER_OS2 */ |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
132 #endif /* SDL_POWER_DISABLED */ |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
133 |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
134 /* vi: set ts=4 sw=4 expandtab: */ |
b7a48f533966
Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
135 |