From 0293ec532d200b4ca549ec52ddd501f3028e27d0 Mon Sep 17 00:00:00 2001 From: pagefault <> Date: Sat, 1 Oct 2005 22:23:05 +0000 Subject: [PATCH] Battery status only works on systems with one, silly me --- zsnes/src/uic.c | 13 +++++++++---- zsnes/src/win/winlink.cpp | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/zsnes/src/uic.c b/zsnes/src/uic.c index 616ab53f..6620b8ef 100644 --- a/zsnes/src/uic.c +++ b/zsnes/src/uic.c @@ -338,14 +338,19 @@ static char *int_to_asc(size_t number) } #ifdef __WIN32__ -int WinCheckBatteryTime(); +signed int WinCheckBatteryTime(); extern unsigned int MessageOn; extern unsigned int MsgCount; void DisplayBatteryStatus() { - Msgptr = seconds_to_asc(WinCheckBatteryTime()); - MsgCount = 300; - MessageOn = 1; + signed int batteryTime = WinCheckBatteryTime(); + + if (batteryTime>0) + { + Msgptr = seconds_to_asc(batteryTime); + MsgCount = 50000; + MessageOn = 2000; + } } #endif diff --git a/zsnes/src/win/winlink.cpp b/zsnes/src/win/winlink.cpp index d4857441..c4ee4a68 100644 --- a/zsnes/src/win/winlink.cpp +++ b/zsnes/src/win/winlink.cpp @@ -3089,7 +3089,7 @@ void InitDebugger() } } -unsigned int WinCheckBatteryTime() +signed int WinCheckBatteryTime() { SYSTEM_POWER_STATUS SysPowerStat;