[SDL] SDL 1.3 API proposal: power status

Ryan C. Gordon icculus at icculus.org
Tue Jun 30 00:04:03 PDT 2009


> I still need to fill in the Linux code, and I need someone else to 
> handle Nintendo DS (and iPhone?). If this fails to build somewhere, 
> please let me know!

As an update, I have tested this on Linux (/proc/acpi and /proc/apm), 
Mac OS X, and Windows, and updated the project files to support it.

I would appreciate if someone could poke at this on iPhone, Windows CE, 
and Nintendo DS, as I can't implement these platforms myself.

All interested parties should give it a try on their machines for the 
standard platforms (try testpower.c in the "test" directory). Please let 
me know if it got the information wrong, etc.

If your platform needs tweaking and you want to tweak:
- Possibly implement src/power/MY_PLATFORM/SDL_syspower.c
- Possibly update the list of drivers at the top of src/power/SDL_power.c
- Define SDL_POWER_MY_PLATFORM as appropriate.
- Add src/power/SDL_power.c and src/power/MY_PLATFORM/SDL_syspower.c to 
the build.

The code for platforms like BeOS and OS/2 is in revision control, but I 
can't test these to even see if they compile...heck, at the moment, I 
don't think we even support these platforms in SDL 1.3, but I filled 
them in, just in case.

Comments, questions, problems: please see me.

Thanks,
--ryan.




More information about the SDL mailing list