Commit 4032e9e7 authored by vgmoose's avatar vgmoose 🌱
Browse files

Merge branch 'wiiu_fixes' of github.com:Maschell/hb-appstore

parents aa27c3bb e162add7
Pipeline #225971661 passed with stage
in 7 minutes and 17 seconds
......@@ -4,3 +4,4 @@ appstore.*
.gitignore
repos.json
settings.json
build/*
......@@ -36,7 +36,7 @@ CXXFLAGS := $(CFLAGS) -std=gnu++14
ASFLAGS := -g $(MACHDEP)
LDFLAGS := -g $(MACHDEP) $(RPXSPECS) -Wl,-Map,$(notdir $*.map)
LIBS := -lSDL2_ttf -lSDL2_mixer -lSDL2_gfx -lSDL2_image -lSDL2 -lfreetype -lpng -lmpg123 -lbz2 -ljpeg -lz -lwut
LIBS := -lSDL2_ttf -lSDL2_mixer -lSDL2_gfx -lSDL2_image -lSDL2 -lfreetype -lpng -lmpg123 -lbz2 -ljpeg -lz -lwut
#-------------------------------------------------------------------------------
# list of directories containing libraries, this must be the top level
......@@ -105,7 +105,7 @@ else
#-------------------------------------------------------------------------------
# romfs
#-------------------------------------------------------------------------------
include $(PWD)/libs/chesto/libs/resinfs/share/romfs-wiiu.mk
include $(TOPDIR)/libs/chesto/libs/resinfs/share/romfs-wiiu.mk
CFLAGS += $(ROMFS_CFLAGS)
CXXFLAGS += $(ROMFS_CFLAGS)
LIBS += $(ROMFS_LIBS)
......
......@@ -6,6 +6,11 @@
#include <romfs-wiiu.h>
#include <unistd.h>
#include <sysapp/launch.h>
#include <whb/log.h>
#include <whb/log_cafe.h>
#include <whb/log_udp.h>
#include <proc_ui/procui.h>
#include <unistd.h>
#include <sys/iosupport.h>
......@@ -26,8 +31,38 @@ static bool running = true;
void quit()
{
#ifdef __WIIU__
SYSLaunchMenu();
#else
running = false;
#endif
}
#ifdef __WIIU__
bool CheckRunning(){
switch(ProcUIProcessMessages(true))
{
case PROCUI_STATUS_EXITING:
{
return false;
}
case PROCUI_STATUS_RELEASE_FOREGROUND:
{
ProcUIDrawDoneRelease();
break;
}
case PROCUI_STATUS_IN_FOREGROUND:
{
break;
}
case PROCUI_STATUS_IN_BACKGROUND:
default:
break;
}
return true;
}
#endif
int main(int argc, char* argv[])
{
......@@ -109,6 +144,12 @@ int main(int argc, char* argv[])
while (running)
{
#ifdef __WIIU__
if(!CheckRunning()){
exit(0);
break;
}
#endif
bool atLeastOneNewEvent = false;
bool viewChanged = false;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment