From 83c5c08010745b9d6567dadf6880602f9548d1cc Mon Sep 17 00:00:00 2001 From: gingerBill Date: Thu, 30 Jan 2025 14:33:20 +0000 Subject: [PATCH] Add sdl3_power.odin --- vendor/sdl3/sdl3_power.odin | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 vendor/sdl3/sdl3_power.odin diff --git a/vendor/sdl3/sdl3_power.odin b/vendor/sdl3/sdl3_power.odin new file mode 100644 index 000000000..7e792de27 --- /dev/null +++ b/vendor/sdl3/sdl3_power.odin @@ -0,0 +1,17 @@ +package sdl3 + +import "core:c" + +PowerState :: enum c.int { + ERROR = -1, /**< error determining power status */ + UNKNOWN, /**< cannot determine power status */ + ON_BATTERY, /**< Not plugged in, running on the battery */ + NO_BATTERY, /**< Plugged in, no battery available */ + CHARGING, /**< Plugged in, charging battery */ + CHARGED, /**< Plugged in, battery charged */ +} + +@(default_calling_convention="c", link_prefix="SDL_") +foreign lib { + GetPowerInfo :: proc(seconds: ^c.int, percent: ^c.int) -> PowerState --- +} \ No newline at end of file