Xbox: try to fix can't go back to launcher menu

This commit is contained in:
UnknownShadow200 2025-08-15 18:25:08 +10:00
parent 725b5d5973
commit c6abd08689
3 changed files with 8 additions and 6 deletions

View File

@ -8,7 +8,7 @@ cc_uint8 Platform_Flags = PLAT_FLAG_SINGLE_PROCESS | PLAT_FLAG_APP_EXIT;
int main(int argc, char** argv) {
SetupProgram(argc, argv);
while (Window_Main.Exists) {
RunProgram(argc, argv);
RunProgram(argc, argv);
}
Window_Free();

View File

@ -5,7 +5,7 @@
#include <pbkit/pbkit.h>
#define _NV_ALPHAKILL_EN (1 << 4)
#define _NV_ALPHAKILL_EN (1 << 2)
#define MAX_RAM_ADDR 0x03FFAFFF
#define MASK(mask, val) (((val) << (__builtin_ffs(mask)-1)) & (mask))
@ -113,8 +113,7 @@ void Gfx_Create(void) {
Gfx.MaxTexHeight = 512; // TODO: 1024?
Gfx.Created = true;
InitDefaultResources();
pb_init();
InitDefaultResources();
pb_show_front_screen();
SetupShaders();
@ -130,8 +129,8 @@ void Gfx_Create(void) {
}
void Gfx_Free(void) {
FreeDefaultResources();
pb_kill();
FreeDefaultResources();
pb_show_debug_screen();
}
cc_bool Gfx_TryRestoreContext(void) { return true; }

View File

@ -13,6 +13,7 @@
#include <hal/video.h>
#include <usbh_lib.h>
#include <xid_driver.h>
#include <pbkit/pbkit.h>
static cc_bool launcherMode;
struct _DisplayData DisplayInfo;
@ -20,6 +21,8 @@ struct cc_window WindowInfo;
void Window_PreInit(void) {
XVideoSetMode(640, 480, 32, REFRESH_DEFAULT); // TODO not call
pb_init();
pb_show_debug_screen();
}
void Window_Init(void) {