mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-15 10:35:11 -04:00
Wii/GameCube: Fix broken due to last commit, and respond to wiit shutdown signal
This commit is contained in:
parent
c47f48d187
commit
d43dbefab4
@ -637,9 +637,8 @@ static void AppendDevice(cc_string* path, char* cwd) {
|
||||
int deviceEnd = String_IndexOf(&cwd_, ':');
|
||||
|
||||
if (deviceEnd >= 0) {
|
||||
cc_string dev = String_UNSAFE_Substring(&cwd_, 0, deviceEnd);
|
||||
// e.g. "card0:/" becomes "card0"
|
||||
String_Append(path, &dev);
|
||||
String_AppendAll(path, cwd, deviceEnd);
|
||||
} else {
|
||||
String_AppendConst(path, "sd");
|
||||
}
|
||||
|
@ -16,8 +16,17 @@
|
||||
static void* xfb;
|
||||
static GXRModeObj* rmode;
|
||||
void* Window_XFB;
|
||||
static void OnPowerOff(void) {
|
||||
Event_RaiseVoid(&WindowEvents.Closing);
|
||||
WindowInfo.Exists = false;
|
||||
}
|
||||
|
||||
void Window_Init(void) {
|
||||
void Window_Init(void) {
|
||||
// TODO: SYS_SetResetCallback(reload); too? not sure how reset differs on GC/WII
|
||||
#if defined HW_RVL
|
||||
SYS_SetPowerCallback(OnPowerOff);
|
||||
#endif
|
||||
|
||||
// Initialise the video system
|
||||
VIDEO_Init();
|
||||
|
||||
@ -81,6 +90,7 @@ void Window_Close(void) {
|
||||
/* TODO implement */
|
||||
}
|
||||
|
||||
|
||||
static void HandlePADInput(void) {
|
||||
PADStatus pads[4];
|
||||
PAD_Read(pads);
|
||||
@ -356,5 +366,4 @@ void Window_DisableRawMouse(void) {
|
||||
RegrabMouse();
|
||||
Input_RawMode = false;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user