Skip to content

Commit 16f7ba7

Browse files
committed
cli: set renderer to null , wiiu: upgrade elf->rpx logic
1 parent 3aebed8 commit 16f7ba7

5 files changed

Lines changed: 36 additions & 5 deletions

File tree

console/Menu.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ void Menu::display()
119119

120120
console->drawColorString(5, 12, "Press [A] to install this package", 0xff, 0xff, 0x00);
121121

122-
if (cur->status != GET)
122+
if (cur->status != GET && cur->status != LOCAL)
123123
console->drawColorString(5, 14, "Press [X] to remove this package", 0xff, 0xff, 0x00);
124124

125125
console->drawString(5, 16, "Press [B] to go back");

console/console_main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ int console_main(RootDisplay* rootDisplay, InputEvents* input)
1212
{
1313
// initialize text console
1414
SDL_DestroyRenderer(rootDisplay->renderer);
15+
rootDisplay->renderer = NULL;
1516
Console* console = new Console(rootDisplay->window);
1617

1718
// create main menu object

libs/chesto

Submodule chesto updated from 6b53cb4 to 27d321c

libs/get

Submodule get updated from c2d6f6a to ccb2a3f

main.cpp

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
#if defined(__WIIU__)
66
#include <romfs-wiiu.h>
77
#include <unistd.h>
8+
9+
10+
#include <unistd.h>
11+
#include <sys/iosupport.h>
812
#endif
913

1014
#include "libs/get/src/Get.hpp"
@@ -15,6 +19,7 @@
1519

1620
#include "console/Menu.hpp"
1721

22+
1823
#include "main.hpp"
1924

2025
static bool running = true;
@@ -30,6 +35,9 @@ int main(int argc, char* argv[])
3035
// stdout = stderr; // for yuzu
3136

3237
#if defined(__WIIU__)
38+
// WHBLogUdpInit();
39+
// WHBLogCafeInit();
40+
3341
#define HBAS_PATH ROOT_PATH "wiiu/apps/appstore"
3442
#define ELF_PATH HBAS_PATH "/hbas.elf"
3543
#define RPX_PATH HBAS_PATH "/appstore.rpx"
@@ -39,7 +47,22 @@ int main(int argc, char* argv[])
3947
// "migrate" old elf users over to rpx (should've been done last version)
4048
struct stat sbuff;
4149
if (stat(ELF_PATH, &sbuff) == 0)
42-
std::rename(ELF_PATH, RPX_PATH);
50+
{
51+
// hbas.elf exists... what should we do about it?
52+
if (stat(RPX_PATH, &sbuff) == 0)
53+
{
54+
// rpx is here, we can just delete hbas.elf
55+
// if we really have to, we can have wiiu-hbas.elf later for nostalgic people for the old version
56+
int re = std::remove(ELF_PATH);
57+
printf("Status removing folder... %d, %d: %s\n", re, errno, strerror(errno));
58+
}
59+
else
60+
{
61+
// no rpx, let's move our elf there
62+
int re = std::rename(ELF_PATH, RPX_PATH);
63+
printf("Status renaming folder... %d, %d: %s\n", re, errno, strerror(errno));
64+
}
65+
}
4366
#endif
4467

4568
init_networking();
@@ -62,7 +85,7 @@ int main(int argc, char* argv[])
6285
while (events->update()) {
6386
cliMode |= (events->held(L_BUTTON) || events->held(R_BUTTON));
6487
}
65-
SDL_Delay(32);
88+
SDL_Delay(16);
6689
}
6790

6891
if (cliMode)
@@ -72,6 +95,9 @@ int main(int argc, char* argv[])
7295
console_main(display, events);
7396
running = false;
7497
}
98+
else
99+
// start music (only if MUSIC defined)
100+
display->initAndStartMusic();
75101

76102
DownloadQueue::init();
77103

@@ -132,5 +158,9 @@ int main(int argc, char* argv[])
132158
socketExit();
133159
#endif
134160

161+
#if defined(__WIIU__)
162+
// WHBLogUdpDeinit();
163+
#endif
164+
135165
return 0;
136166
}

0 commit comments

Comments
 (0)