mirror of
https://github.com/XorTroll/hb-appstore.git
synced 2025-03-01 14:57:31 +00:00
switch: HTTP download, fix unzipping
This commit is contained in:
parent
d0d0c147ac
commit
d0b522ab97
@ -29,7 +29,7 @@ void Input::updateButtons()
|
||||
this->btns_h |= ((event.key.keysym.sym == SDLK_DOWN)? BUTTON_DOWN : 0);
|
||||
this->btns_h |= ((event.key.keysym.sym == SDLK_LEFT)? BUTTON_LEFT : 0);
|
||||
this->btns_h |= ((event.key.keysym.sym == SDLK_RIGHT)? BUTTON_RIGHT : 0);
|
||||
this->btns_h |= ((event.key.keysym.sym == SDLK_PLUS || event.key.keysym.sym == SDLK_RETURN)? BUTTON_PLUS : 0);
|
||||
this->btns_h |= ((event.key.keysym.sym == SDLK_MINUS|| event.key.keysym.sym == SDLK_RETURN)? BUTTON_MINUS : 0);
|
||||
this->btns_h |= ((event.key.keysym.sym == SDLK_x)? BUTTON_X : 0);
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
#define BUTTON_DOWN 0b00001000
|
||||
|
||||
#define BUTTON_X 0b00010000
|
||||
#define BUTTON_PLUS 0b00100000
|
||||
#define BUTTON_MINUS 0b00100000
|
||||
|
||||
#define BUTTON_A 0b01000000
|
||||
#define BUTTON_B 0b10000000
|
||||
|
8
Makefile
8
Makefile
@ -40,8 +40,8 @@ INCLUDES := . $(RAPIDJSON) $(MINIZIP)
|
||||
#DATA := data
|
||||
EXEFS_SRC := exefs_src
|
||||
|
||||
APP_TITLE := App Store
|
||||
APP_AUTHOR := VGMoose
|
||||
APP_TITLE := hb App Store
|
||||
APP_AUTHOR := vgmoose
|
||||
APP_VERSION := 0.5
|
||||
ICON := icon.jpg
|
||||
#APP_TITLEID := is the titleID of the app stored in the .nacp file (Optional)
|
||||
@ -55,7 +55,7 @@ CFLAGS := -g -Wall -O2 \
|
||||
-ffast-math \
|
||||
$(ARCH) $(DEFINES)
|
||||
|
||||
CFLAGS += $(INCLUDE) -DSWITCH -D__LIBNX__ -DNOSTYLUS
|
||||
CFLAGS += $(INCLUDE) -DSWITCH -D__LIBNX__ -DNOSTYLUS -DUSE_FILE32API
|
||||
|
||||
|
||||
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++11
|
||||
@ -63,7 +63,7 @@ CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++11
|
||||
ASFLAGS := -g $(ARCH)
|
||||
LDFLAGS = -specs=$(DEVKITPRO)/libnx/switch.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map)
|
||||
|
||||
LIBS := -lSDL_gfx -lSDL_image -lSDL -lz -lcurl -lnx -lm
|
||||
LIBS := -lSDL_gfx -lSDL_image -lSDL -lz -lnx -lm #-lcurl
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# list of directories containing libraries, this must be the top level containing
|
||||
|
@ -6,9 +6,10 @@ MINIZIP_O := zip.o ioapi.o unzip.o
|
||||
|
||||
all:
|
||||
gcc -c $(MINIZIP)/*.c
|
||||
g++ -std=gnu++11 *.cpp -lSDL -lSDLmain ./libs/get/src/*.cpp $(MINIZIP_O) -I $(RAPIDJSON) -I $(MINIZIP) -I /usr/local/include -lcurl -lz -o appstore.exe
|
||||
g++ -std=gnu++11 *.cpp -lSDL -lSDLmain ./libs/get/src/*.cpp $(MINIZIP_O) -I $(RAPIDJSON) -I $(MINIZIP) -I /usr/local/include -lcurl -lz -o appstore.exe -fstack-protector-all
|
||||
|
||||
macos:
|
||||
g++ -std=gnu++11 *.cpp -lSDL -lSDLmain -framework Cocoa ./libs/get/src/*.cpp $(MINIZIP_O) -I $(RAPIDJSON) -I $(MINIZIP) -I /usr/local/include -lcurl -lz -o appstore.exe
|
||||
gcc -c $(MINIZIP)/*.c
|
||||
g++ -std=gnu++11 *.cpp -lSDL -lSDLmain -framework Cocoa ./libs/get/src/*.cpp $(MINIZIP_O) -I $(RAPIDJSON) -I $(MINIZIP) -I /usr/local/include -lcurl -lz -o appstore.exe -fstack-protector-all
|
||||
clean:
|
||||
rm *.o *.bin
|
||||
|
9
Menu.cpp
9
Menu.cpp
@ -25,7 +25,7 @@ void Menu::display()
|
||||
{
|
||||
console->drawString(9, 21, "Homebrew App Store (Preview!)");
|
||||
console->drawColorString(9, 26, "thanks to:", 0xcc, 0xcc, 0xcc);
|
||||
console->drawColorString(15, 27, "vgmoose, pwsincd, rw-r-r_0644, zarklord, kgsws", 0xcc, 0xcc, 0xcc);
|
||||
console->drawColorString(15, 27, "vgmoose, pwsincd, rw-r-r_0644, zarklord", 0xcc, 0xcc, 0xcc);
|
||||
console->drawColorString(9, 32, "Press [A] to continue", 0xff, 0xff, 0x00);
|
||||
}
|
||||
|
||||
@ -76,6 +76,13 @@ void Menu::display()
|
||||
|
||||
if (this->screen == INSTALL_SCREEN)
|
||||
{
|
||||
if (this->position < 0 || this->position > get->packages.size())
|
||||
{
|
||||
// invalid selection, go back a screen
|
||||
this->screen--;
|
||||
return;
|
||||
}
|
||||
|
||||
// currently selected package
|
||||
Package* cur = get->packages[this->position];
|
||||
|
||||
|
2
libs/get
2
libs/get
@ -1 +1 @@
|
||||
Subproject commit 911f296e55c71db4df7bb2c8455ee4d7c79016ae
|
||||
Subproject commit 7a97cbb861d2697aefb6e92a4b4aca01621baa56
|
8
main.cpp
8
main.cpp
@ -27,7 +27,7 @@ int main(int argc, char *argv[])
|
||||
menu->display();
|
||||
SDL_Delay(16);
|
||||
|
||||
// updeate pressed buttons in input object
|
||||
// update pressed buttons in input object
|
||||
input->updateButtons();
|
||||
|
||||
// if we're on the install screen, perform an install
|
||||
@ -58,7 +58,11 @@ int main(int argc, char *argv[])
|
||||
menu->screen = REMOVING;
|
||||
|
||||
// if plus is pressed, exit
|
||||
if (input->held(BUTTON_PLUS))
|
||||
if (input->held(BUTTON_MINUS))
|
||||
running = false;
|
||||
|
||||
// if B is pressed on the splash screen, exit
|
||||
if (menu->screen == SPLASH && input->held(BUTTON_B))
|
||||
running = false;
|
||||
|
||||
// move cursor up or down depending on input
|
||||
|
Loading…
x
Reference in New Issue
Block a user