Merge remote-tracking branch 'refs/remotes/Nanolx/master'
11
.gitignore
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
dist/HBF0.vWii.wad
|
||||
dist/HBF0.wad
|
||||
dist/HomebrewFilter-Standalone-rev*.tar.bz2
|
||||
dist/HomebrewFilter-rev*.tar.bz2
|
||||
dist/HomebrewFilter-vWii-Standalone-rev*.tar.bz2
|
||||
dist/HomebrewFilter-vWii-rev*.tar.bz2
|
||||
dist/HomebrewFilter.Standalone/boot.dol
|
||||
dist/HomebrewFilter.vWii.Standalone/boot.dol
|
||||
dist/HomebrewFilter.vWii/boot.dol
|
||||
dist/HomebrewFilter/boot.dol
|
||||
tools/common-key.bin
|
2
AUTHORS
@ -1,2 +1,2 @@
|
||||
2010 - 2011 hamachi-mp
|
||||
2011 - 2012 Nano <nano@tuxfamily.org>
|
||||
2011 - 2016 Nano <nano@jpberlin.de>
|
||||
|
2
BUGS
@ -1,5 +1,5 @@
|
||||
Report bugs to:
|
||||
|
||||
a) nano@tuxfamily.org
|
||||
a) nano [AT] jpberlin [DOT] de
|
||||
b) In the '[Wii] HomebreFilter' Thread over at:
|
||||
http://forum.wii-homebrew.com/board42-kreativitaet/development/
|
||||
|
63
Makefile
@ -1,17 +1,17 @@
|
||||
all:
|
||||
@echo either use "make dist" or "make dist_vwii"
|
||||
@echo either use "make full_dist", "make dist_wii" or "make dist_vwii"
|
||||
|
||||
REV=$(shell grep define svnrev/svnrev.c | gawk '{print $$3}')
|
||||
|
||||
full_dist: dist dist_vwii pack_forwarder
|
||||
full_dist: dist_wii dist_vwii pack_forwarder
|
||||
|
||||
dist: compile_installer compile_stboot
|
||||
@tar cfj HomebrewFilter-rev$(REV).tar.bz2 HomebrewFilter/
|
||||
@tar cfj HomebrewFilter-Standalone-rev$(REV).tar.bz2 HomebrewFilter.Standalone/
|
||||
dist_wii: compile_installer compile_stboot
|
||||
@tar cfj dist/HomebrewFilter-rev$(REV).tar.bz2 dist/HomebrewFilter/
|
||||
@tar cfj dist/HomebrewFilter-Standalone-rev$(REV).tar.bz2 dist/HomebrewFilter.Standalone/
|
||||
|
||||
dist_vwii: compile_installer_vwii compile_stboot_vwii
|
||||
@tar cfj HomebrewFilter-vWii-rev$(REV).tar.bz2 HomebrewFilter.vWii/
|
||||
@tar cfj HomebrewFilter-vWii-Standalone-rev$(REV).tar.bz2 HomebrewFilter.vWii.Standalone/
|
||||
@tar cfj dist/HomebrewFilter-vWii-rev$(REV).tar.bz2 dist/HomebrewFilter.vWii/
|
||||
@tar cfj dist/HomebrewFilter-vWii-Standalone-rev$(REV).tar.bz2 dist/HomebrewFilter.vWii.Standalone/
|
||||
|
||||
compile_forwarder:
|
||||
@make -C forwarder
|
||||
@ -19,13 +19,13 @@ compile_forwarder:
|
||||
@cp forwarder/forwarder.dol forwarder/wad.vwii/00000001.app
|
||||
|
||||
pack_forwarder: compile_forwarder
|
||||
@tools/WadMii.exe -input "Z:$(PWD)\forwarder\wad" -output "Z:$(PWD)\HBF0.wad" || wine tools/WadMii.exe -input "Z:$(PWD)\forwarder\wad" -output "Z:$(PWD)\HBF0.wad"
|
||||
@tools/WadMii.exe -input "Z:$(PWD)\forwarder\wad.vwii" -output "Z:$(PWD)\HBF0.vWii.wad" || wine tools/WadMii.exe -input "Z:$(PWD)\forwarder\wad" -output "Z:$(PWD)\HBF0.vWii.wad"
|
||||
@wine tools/WadMii.exe -input "Z:$(PWD)\forwarder\wad" -output "Z:$(PWD)\dist\HBF0.wad"
|
||||
@wine tools/WadMii.exe -input "Z:$(PWD)\forwarder\wad" -output "Z:$(PWD)\dist\HBF0.vWii.wad"
|
||||
|
||||
distclean: clean
|
||||
@rm -f HomebrewFilter*/boot.dol
|
||||
@rm -f HomebrewFilter*.tar.bz2
|
||||
@rm -f HBF0*.wad
|
||||
@rm -f dist/HomebrewFilter*/boot.dol
|
||||
@rm -f dist/HomebrewFilter*.tar.bz2
|
||||
@rm -f dist/HBF0*.wad
|
||||
|
||||
clean:
|
||||
@make -C main clean
|
||||
@ -35,44 +35,40 @@ clean:
|
||||
@make -C forwarder clean
|
||||
@make -C libruntimeiospatch clean
|
||||
|
||||
clean_vwii:
|
||||
@make -C main clean
|
||||
@make -C boot clean
|
||||
@make -C installer clean
|
||||
|
||||
nand_loader:
|
||||
@make -C nand-loader
|
||||
|
||||
libruntimeiospatch:
|
||||
@make -C libruntimeiospatch
|
||||
|
||||
compile_stboot: clean
|
||||
compile_stboot:
|
||||
@echo "============================"
|
||||
@echo "== HBF Standalone for Wii =="
|
||||
@echo "============================"
|
||||
@rm -f HomebrewFilter.Standalone/boot.dol
|
||||
@make -C main clean
|
||||
@rm -f dist/HomebrewFilter.Standalone/boot.dol
|
||||
@make clean
|
||||
@XFLAGS="-DSTBOOT" make -C main
|
||||
@cp main/hbf.dol boot/source/hbf.dol
|
||||
@make -C boot
|
||||
@cp boot/hbf_boot.dol HomebrewFilter.Standalone/boot.dol
|
||||
@cp boot/hbf_boot.dol dist/HomebrewFilter.Standalone/boot.dol
|
||||
|
||||
compile_stboot_vwii: clean_vwii
|
||||
compile_stboot_vwii:
|
||||
@echo "============================="
|
||||
@echo "== HBF Standalone for vWii =="
|
||||
@echo "============================="
|
||||
@rm -f HomebrewFilter.vWii.Standalone/boot.dol
|
||||
@make -C main clean
|
||||
@rm -f dist/HomebrewFilter.vWii.Standalone/boot.dol
|
||||
@make clean
|
||||
@XFLAGS="-DSTBOOTVWII -DVWII" make -C main
|
||||
@cp main/hbf.dol boot/source/hbf.dol
|
||||
@make -C boot
|
||||
@cp boot/hbf_boot.dol HomebrewFilter.vWii.Standalone/boot.dol
|
||||
@cp boot/hbf_boot.dol dist/HomebrewFilter.vWii.Standalone/boot.dol
|
||||
|
||||
compile_hbf: clean
|
||||
compile_hbf:
|
||||
@echo "==========================="
|
||||
@echo "== HBF Installer for Wii =="
|
||||
@echo "==========================="
|
||||
@rm -f HomebrewFilter/boot.dol
|
||||
@rm -f dist/HomebrewFilter/boot.dol
|
||||
@make clean
|
||||
@make -C main
|
||||
@cp main/hbf.dol boot/source/hbf.dol
|
||||
|
||||
@ -81,15 +77,16 @@ compile_boot: compile_hbf
|
||||
@cp boot/hbf_boot.dol installer/wad/00000001.app
|
||||
|
||||
compile_installer: compile_boot
|
||||
@tools/WadMii.exe -input "Z:$(PWD)\installer\wad" -output "Z:$(PWD)\installer\data\install.wad" || wine tools/WadMii.exe -input "Z:$(PWD)\installer\wad" -output "Z:$(PWD)\installer\data\install.wad"
|
||||
@wine tools/WadMii.exe -input "Z:$(PWD)\installer\wad" -output "Z:$(PWD)\installer\data\install.wad"
|
||||
@make -C installer
|
||||
@cp installer/installer.dol HomebrewFilter/boot.dol
|
||||
@cp installer/installer.dol dist/HomebrewFilter/boot.dol
|
||||
|
||||
compile_hbf_vwii: clean_vwii
|
||||
compile_hbf_vwii:
|
||||
@echo "============================"
|
||||
@echo "== HBF Installer for vWii =="
|
||||
@echo "============================"
|
||||
@rm -f HomebrewFilter.vWii/boot.dol
|
||||
@rm -f dist/HomebrewFilter.vWii/boot.dol
|
||||
@make clean
|
||||
@XFLAGS="-DVWII" make -C main
|
||||
@cp main/hbf.dol boot/source/hbf.dol
|
||||
|
||||
@ -98,6 +95,6 @@ compile_boot_vwii: compile_hbf_vwii
|
||||
@cp boot/hbf_boot.dol installer/wad.vwii/00000002.app
|
||||
|
||||
compile_installer_vwii: compile_boot_vwii
|
||||
@tools/WadMii.exe -input "Z:$(PWD)\installer\wad.vwii" -output "Z:$(PWD)\installer\data\install.wad" || wine tools/WadMii.exe -input "Z:$(PWD)\installer\wad.vwii" -output "Z:$(PWD)\installer\data\install.wad"
|
||||
@wine tools/WadMii.exe -input "Z:$(PWD)\installer\wad.vwii" -output "Z:$(PWD)\installer\data\install.wad"
|
||||
@make -C installer
|
||||
@cp installer/installer.dol HomebrewFilter.vWii/boot.dol
|
||||
@cp installer/installer.dol dist/HomebrewFilter.vWii/boot.dol
|
||||
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.0 KiB |
@ -2,7 +2,7 @@
|
||||
<app version="1">
|
||||
<name>HomebrewFilter (Standalone)</name>
|
||||
<coder>Nano</coder>
|
||||
<version>rev42</version>
|
||||
<version>rev47</version>
|
||||
<ahb_access/>
|
||||
<short_description>HBF (Standalone)</short_description>
|
||||
<long_description>The HomebrewFilter (Standalone)
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.0 KiB |
@ -2,7 +2,7 @@
|
||||
<app version="1">
|
||||
<name>HomebrewFilter vWii (Standalone)</name>
|
||||
<coder>Nano</coder>
|
||||
<version>rev42</version>
|
||||
<version>rev47</version>
|
||||
<ahb_access/>
|
||||
<short_description>HBF vWii (Standalone)</short_description>
|
||||
<long_description>Standalone HomebrewFilter for vWii
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.0 KiB |
@ -2,7 +2,7 @@
|
||||
<app version="1">
|
||||
<name>HomebrewFilter vWii (Installer)</name>
|
||||
<coder>Nano</coder>
|
||||
<version>rev42</version>
|
||||
<version>rev47</version>
|
||||
<ahb_access/>
|
||||
<short_description>HBF vWii (Installer)</short_description>
|
||||
<long_description>Installs The HomebrewFilter on vWii
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.0 KiB |
@ -2,7 +2,7 @@
|
||||
<app version="1">
|
||||
<name>HomebrewFilter (Installer)</name>
|
||||
<coder>Nano</coder>
|
||||
<version>rev42</version>
|
||||
<version>rev47</version>
|
||||
<ahb_access/>
|
||||
<short_description>HBF (Installer)</short_description>
|
||||
<long_description>Installs The HomebrewFilter on Wii
|
Before Width: | Height: | Size: 538 KiB After Width: | Height: | Size: 543 KiB |
Before Width: | Height: | Size: 538 KiB After Width: | Height: | Size: 543 KiB |
@ -29,12 +29,12 @@ INCLUDES :=
|
||||
CFLAGS = -g -O2 -Wall $(MACHDEP) $(INCLUDE)
|
||||
CXXFLAGS = $(CFLAGS)
|
||||
|
||||
LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map
|
||||
LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map,-wrap,wiiuse_register
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# any extra libraries we wish to link with the project
|
||||
#---------------------------------------------------------------------------------
|
||||
LIBS := -lwiiuse -lbte -logc -lm -lruntimeiospatch
|
||||
LIBS := -lwiiuse -lwupc -lbte -logc -lm -lruntimeiospatch
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# list of directories containing libraries, this must be the top level containing
|
||||
|
@ -1,6 +1,7 @@
|
||||
|
||||
#include <malloc.h>
|
||||
#include <wiiuse/wpad.h>
|
||||
#include <wupc/wupc.h>
|
||||
#include <runtimeiospatch.h>
|
||||
|
||||
#include "menu.h"
|
||||
@ -16,8 +17,9 @@ int main(int argc, char **argv) {
|
||||
VIDEO_Init();
|
||||
Video_SetMode();
|
||||
|
||||
WPAD_Init();
|
||||
PAD_Init();
|
||||
WUPC_Init();
|
||||
WPAD_Init();
|
||||
|
||||
if(AHBPROT_DISABLED)
|
||||
IosPatch_RUNTIME(true, false, false, true);
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include <sstream>
|
||||
#include <vector>
|
||||
#include <wiiuse/wpad.h>
|
||||
#include <wupc/wupc.h>
|
||||
|
||||
#include "getios.h"
|
||||
#include "menu.h"
|
||||
@ -35,15 +36,15 @@ void show_menu_head()
|
||||
{
|
||||
Con_FgColor(6, 1);
|
||||
printf("\x1b[%i;%iH", startpos_x, startpos_y);
|
||||
printf("HBF installer v0.4");
|
||||
printf("HBF installer v0.5");
|
||||
|
||||
Con_FgColor(7, 1);
|
||||
printf("\t\t\t\t\t(C) 2011");
|
||||
printf("\t\t\t\t\t(C) 2011 ");
|
||||
Con_FgColor(6, 1);
|
||||
printf(" hamachi-mp");
|
||||
|
||||
Con_FgColor(7, 1);
|
||||
printf("\n\t\t\t\t\t\t\t\t\t\t\t\t(C) 2012");
|
||||
printf("\n\t\t\t\t\t\t\t\t\t\t\t\t(C) 2012, 2016");
|
||||
Con_FgColor(6, 1);
|
||||
printf(" Nano & Obcd");
|
||||
}
|
||||
@ -164,11 +165,13 @@ int menu_main(int scrollpos)
|
||||
bool scroll = true;
|
||||
while(1)
|
||||
{
|
||||
WUPC_UpdateButtonStats();
|
||||
WPAD_ScanPads();
|
||||
PAD_ScanPads();
|
||||
|
||||
if((WPAD_ButtonsDown(0) & (WPAD_BUTTON_DOWN | WPAD_CLASSIC_BUTTON_DOWN)
|
||||
|| (PAD_ButtonsDown(0) & PAD_BUTTON_DOWN)) && scrollpos < (signed)text1.size() -1)
|
||||
|| (PAD_ButtonsDown(0) & PAD_BUTTON_DOWN)
|
||||
|| (WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_DOWN)) && scrollpos < (signed)text1.size() -1)
|
||||
{
|
||||
scrollpos++;
|
||||
while(text1[scrollpos] == "")
|
||||
@ -180,7 +183,8 @@ int menu_main(int scrollpos)
|
||||
Pad_unpressed();
|
||||
}
|
||||
else if((WPAD_ButtonsDown(0) & (WPAD_BUTTON_UP | WPAD_CLASSIC_BUTTON_UP)
|
||||
|| (PAD_ButtonsDown(0) & PAD_BUTTON_UP)) && scrollpos != 0)
|
||||
|| (PAD_ButtonsDown(0) & PAD_BUTTON_UP)
|
||||
|| (WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_UP)) && scrollpos != 0)
|
||||
{
|
||||
scrollpos--;
|
||||
while(text1[scrollpos] == "")
|
||||
@ -206,7 +210,9 @@ int menu_main(int scrollpos)
|
||||
scroll = false;
|
||||
}
|
||||
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A) || PAD_ButtonsDown(0) & PAD_BUTTON_A)
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A)
|
||||
|| PAD_ButtonsDown(0) & PAD_BUTTON_A
|
||||
|| WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_A)
|
||||
{
|
||||
menu_main_choice = scrollpos;
|
||||
switch(scrollpos)
|
||||
@ -254,11 +260,13 @@ int menu_install_uninstall(int install)
|
||||
bool scroll = true;
|
||||
while(1)
|
||||
{
|
||||
WUPC_UpdateButtonStats();
|
||||
WPAD_ScanPads();
|
||||
PAD_ScanPads();
|
||||
|
||||
if((WPAD_ButtonsDown(0) & (WPAD_BUTTON_DOWN | WPAD_CLASSIC_BUTTON_DOWN)
|
||||
|| (PAD_ButtonsDown(0) & PAD_BUTTON_DOWN)) && scrollpos < (signed)text2.size() -1)
|
||||
|| (PAD_ButtonsDown(0) & PAD_BUTTON_DOWN)
|
||||
|| (WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_DOWN)) && scrollpos < (signed)text2.size() -1)
|
||||
{
|
||||
scrollpos++;
|
||||
scroll = true;
|
||||
@ -267,7 +275,8 @@ int menu_install_uninstall(int install)
|
||||
Pad_unpressed();
|
||||
}
|
||||
else if((WPAD_ButtonsDown(0) & (WPAD_BUTTON_UP | WPAD_CLASSIC_BUTTON_UP)
|
||||
|| (PAD_ButtonsDown(0) & PAD_BUTTON_UP)) && scrollpos != 0)
|
||||
|| (PAD_ButtonsDown(0) & PAD_BUTTON_UP)
|
||||
|| (WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_UP)) && scrollpos != 0)
|
||||
{
|
||||
scrollpos--;
|
||||
scroll = true;
|
||||
@ -290,7 +299,9 @@ int menu_install_uninstall(int install)
|
||||
scroll = false;
|
||||
}
|
||||
|
||||
if( WPAD_ButtonsDown(0) & (WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A) || PAD_ButtonsDown(0) & PAD_BUTTON_A )
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A)
|
||||
|| PAD_ButtonsDown(0) & PAD_BUTTON_A
|
||||
|| WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_A)
|
||||
{
|
||||
switch(scrollpos)
|
||||
{
|
||||
@ -363,10 +374,13 @@ int menu_install()
|
||||
|
||||
while(1)
|
||||
{
|
||||
WUPC_UpdateButtonStats();
|
||||
WPAD_ScanPads();
|
||||
PAD_ScanPads();
|
||||
|
||||
if( WPAD_ButtonsDown(0) & (WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A) || PAD_ButtonsDown(0) & PAD_BUTTON_A )
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A)
|
||||
|| PAD_ButtonsDown(0) & PAD_BUTTON_A
|
||||
|| WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_A)
|
||||
return MENU_MAIN;
|
||||
}
|
||||
}
|
||||
@ -430,9 +444,12 @@ int menu_reinstall()
|
||||
|
||||
while(1)
|
||||
{
|
||||
WUPC_UpdateButtonStats();
|
||||
WPAD_ScanPads();
|
||||
PAD_ScanPads();
|
||||
if( WPAD_ButtonsDown(0) & (WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A) || PAD_ButtonsDown(0) & PAD_BUTTON_A )
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A)
|
||||
|| PAD_ButtonsDown(0) & PAD_BUTTON_A
|
||||
|| WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_A)
|
||||
return MENU_MAIN;
|
||||
}
|
||||
|
||||
@ -455,9 +472,12 @@ int menu_uninstall()
|
||||
|
||||
while(1)
|
||||
{
|
||||
WUPC_UpdateButtonStats();
|
||||
WPAD_ScanPads();
|
||||
PAD_ScanPads();
|
||||
if( WPAD_ButtonsDown(0) & (WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A) || PAD_ButtonsDown(0) & PAD_BUTTON_A )
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A)
|
||||
|| PAD_ButtonsDown(0) & PAD_BUTTON_A
|
||||
|| WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_A)
|
||||
return MENU_MAIN;
|
||||
}
|
||||
}
|
||||
@ -480,10 +500,13 @@ int menu_copyright()
|
||||
|
||||
while(1)
|
||||
{
|
||||
WUPC_UpdateButtonStats();
|
||||
WPAD_ScanPads();
|
||||
PAD_ScanPads();
|
||||
|
||||
if( WPAD_ButtonsDown(0) & (WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A) || PAD_ButtonsDown(0) & PAD_BUTTON_A )
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A)
|
||||
|| PAD_ButtonsDown(0) & PAD_BUTTON_A
|
||||
|| WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_A)
|
||||
return MENU_MAIN;
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 387 KiB After Width: | Height: | Size: 397 KiB |
@ -111,6 +111,7 @@ Wii:
|
||||
* ES SetIdentify
|
||||
* Hash Check (aka Trucha)
|
||||
* New Hash Check (aka New Trucha)
|
||||
* SSL patches
|
||||
|
||||
Sciifii:
|
||||
* MEM2 Prot
|
||||
|
@ -1,5 +1,14 @@
|
||||
1.5.3:
|
||||
* changed layout of debug text to ensure it's always visible
|
||||
* added colors to debug text
|
||||
- cyan: headings
|
||||
- green: patch succeeded
|
||||
- red: patch failed
|
||||
|
||||
1.5.2:
|
||||
* added SSL module patches made by FIX94 to fix some certificate errors that occur when attempting to connect to a host using a secure connection (DarkMatterCore)
|
||||
* added SSL module patches made by FIX94 to fix some certificate
|
||||
errors that occur when attempting to connect to a host using a
|
||||
secure connection (DarkMatterCore)
|
||||
|
||||
1.5.1:
|
||||
* code clean-up (JoostinOnline)
|
||||
@ -7,7 +16,9 @@
|
||||
* misc minor changes (JoostinOnline)
|
||||
|
||||
1.5:
|
||||
* add ISFS_SetAttr() patches. (megazig) Forces the ISFS_SetAttr() function to continue instead of returning -102 when you're trying to change the UID/GID of a file.
|
||||
* add ISFS_SetAttr() patches. (megazig)
|
||||
Forces the ISFS_SetAttr() function to continue instead of
|
||||
returning -102 when you're trying to change the UID/GID of a file.
|
||||
|
||||
1.4:
|
||||
* fix value for hash_old (spotted by DarkMatterCore)
|
||||
|
17
libruntimeiospatch/debian/changelog
Normal file
@ -0,0 +1,17 @@
|
||||
libruntimeiospatch (1.5.3-1nano) unstable; urgency=low
|
||||
|
||||
* New upstream release
|
||||
|
||||
-- Christopher Roy Bratusek <nano@jpberlin.de> Wed, 17 Aug 2016 09:51:33 +0200
|
||||
|
||||
libruntimeiospatch (1.5.2-1nano) unstable; urgency=low
|
||||
|
||||
* New upstream release
|
||||
|
||||
-- Christopher Roy Bratusek <nano@jpberlin.de> Sat, 11 Jul 2015 18:35:38 +0200
|
||||
|
||||
libruntimeiospatch (1.5.1-1nano) unstable; urgency=low
|
||||
|
||||
* Initial release
|
||||
|
||||
-- Christopher Roy Bratusek <nano@tuxfamily.org> Sun, 19 Jan 2014 19:00:03 +0100
|
1
libruntimeiospatch/debian/compat
Normal file
@ -0,0 +1 @@
|
||||
9
|
14
libruntimeiospatch/debian/control
Normal file
@ -0,0 +1,14 @@
|
||||
Source: libruntimeiospatch
|
||||
Section: devel
|
||||
Priority: optional
|
||||
Maintainer: Christopher Roy Bratusek <nano@jpberlin.de>
|
||||
Build-Depends: debhelper (>= 8.0.0), devkitppc-amd64 | devkitppc-i686, libogc
|
||||
Standards-Version: 3.9.4
|
||||
Homepage: http://www.nanolx.org/homebrew/libruntimeiospatch
|
||||
|
||||
Package: libruntimeiospatch
|
||||
Architecture: all
|
||||
Depends: devkitppc-amd64 | devkitppc-i686, libogc
|
||||
Conflicts: libogc-runtimeiospatch
|
||||
Description: Wii/vWii development library for homebrew
|
||||
A library providing necessary functions for patching IOS at runtime using HW_AHBPROT.
|
32
libruntimeiospatch/debian/copyright
Normal file
@ -0,0 +1,32 @@
|
||||
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: libruntimeiospatch
|
||||
Source: http://www.nanolx.org/homebrew/libruntimeiospatch
|
||||
|
||||
Files: *
|
||||
Copyright: 2010 Joseph Jordan <joe.ftpii@psychlaw.com.au>
|
||||
2012-2013 damysteryman
|
||||
2012-2013 Christopher Bratusek <nano@jpberlin.de>
|
||||
2013 DarkMatterCore
|
||||
2014 megazig
|
||||
License: GPL-2.0+
|
||||
|
||||
Files: debian/*
|
||||
Copyright: 2014 Christopher Roy Bratusek <nano@jpberlin.de>
|
||||
License: GPL-2.0+
|
||||
|
||||
License: GPL-2.0+
|
||||
This package is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
.
|
||||
This package is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
.
|
||||
On Debian systems, the complete text of the GNU General
|
||||
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
|
1
libruntimeiospatch/debian/docs
Normal file
@ -0,0 +1 @@
|
||||
README
|
13
libruntimeiospatch/debian/rules
Executable file
@ -0,0 +1,13 @@
|
||||
#!/usr/bin/make -f
|
||||
# -*- makefile -*-
|
||||
|
||||
export DH_VERBOSE=1
|
||||
|
||||
%:
|
||||
dh $@
|
||||
|
||||
override_dh_auto_install:
|
||||
mkdir -p $(CURDIR)/debian/libruntimeiospatch/opt/devkitpro/libogc/lib/wii
|
||||
mkdir -p $(CURDIR)/debian/libruntimeiospatch/opt/devkitpro/libogc/include
|
||||
cp $(CURDIR)/libruntimeiospatch.a $(CURDIR)/debian/libruntimeiospatch/opt/devkitpro/libogc/lib/wii/
|
||||
cp $(CURDIR)/source/runtimeiospatch.h $(CURDIR)/debian/libruntimeiospatch/opt/devkitpro/libogc/include/
|
1
libruntimeiospatch/debian/source/format
Normal file
@ -0,0 +1 @@
|
||||
3.0 (quilt)
|
@ -9,7 +9,7 @@
|
||||
|
||||
// Copyright (C) 2010 Joseph Jordan <joe.ftpii@psychlaw.com.au>
|
||||
// Copyright (C) 2012-2013 damysteryman
|
||||
// Copyright (C) 2012-2013 Christopher Bratusek <nano@tuxfamily.org>
|
||||
// Copyright (C) 2012-2015 Christopher Bratusek <nano@jpberlin.de>
|
||||
// Copyright (C) 2013 DarkMatterCore
|
||||
// Copyright (C) 2014 megazig
|
||||
// Copyright (C) 2015 FIX94
|
||||
@ -24,7 +24,12 @@
|
||||
#define MEM_REG_BASE 0xd8b4000
|
||||
#define MEM_PROT (MEM_REG_BASE + 0x20a)
|
||||
|
||||
//const u8 check_tmd_patch1[] = { 0x23, 0x01, 0x42, 0x5B };
|
||||
void TextColor(u32 color, u8 bold)
|
||||
{
|
||||
/* Set foreground color */
|
||||
printf("\x1b[%u;%um", color + 30, bold);
|
||||
fflush(stdout);
|
||||
}
|
||||
|
||||
static inline void disable_memory_protection(void) {
|
||||
write32(MEM_PROT, read32(MEM_PROT) & 0x0000FFFF);
|
||||
@ -102,7 +107,10 @@ static u8 apply_patch(const char *name, const u8 *old, u32 old_size, const u8 *p
|
||||
u8 *ptr_start = (u8*)*((u32*)0x80003134), *ptr_end = (u8*)0x94000000;
|
||||
u8 found = 0;
|
||||
if(verbose)
|
||||
printf(" Patching %-30s", name);
|
||||
{
|
||||
TextColor(7,1);
|
||||
printf("\t\t Patching %-30s", name);
|
||||
}
|
||||
u8 *location = NULL;
|
||||
while (ptr_start < (ptr_end - patch_size)) {
|
||||
if (!memcmp(ptr_start, old, old_size)) {
|
||||
@ -120,9 +128,15 @@ static u8 apply_patch(const char *name, const u8 *old, u32 old_size, const u8 *p
|
||||
}
|
||||
if(verbose){
|
||||
if (found)
|
||||
printf(" patched\n");
|
||||
{
|
||||
TextColor(2, 1);
|
||||
printf("\t\t patched\n");
|
||||
}
|
||||
else
|
||||
printf(" not patched\n");
|
||||
{
|
||||
TextColor(1, 1);
|
||||
printf("\t\t not patched\n");
|
||||
}
|
||||
}
|
||||
return found;
|
||||
}
|
||||
@ -144,9 +158,14 @@ s32 IosPatch_RUNTIME(bool wii, bool sciifii, bool vwii, bool verbose) {
|
||||
|
||||
if (AHBPROT_DISABLED) {
|
||||
disable_memory_protection();
|
||||
if(verbose) printf("\t\t\n\n\n\n\n");
|
||||
if(wii)
|
||||
{
|
||||
if(verbose) printf(">> Applying standard Wii patches:\n");
|
||||
if(verbose)
|
||||
{
|
||||
TextColor(6, 1);
|
||||
printf("\t>> Applying standard Wii patches:\n");
|
||||
}
|
||||
count += apply_patch("di_readlimit", di_readlimit_old, sizeof(di_readlimit_old), di_readlimit_patch, sizeof(di_readlimit_patch), 12, verbose);
|
||||
count += apply_patch("isfs_permissions", isfs_permissions_old, sizeof(isfs_permissions_old), isfs_permissions_patch, sizeof(isfs_permissions_patch), 0, verbose);
|
||||
count += apply_patch("es_setuid", setuid_old, sizeof(setuid_old), setuid_patch, sizeof(setuid_patch), 0, verbose);
|
||||
@ -162,7 +181,11 @@ s32 IosPatch_RUNTIME(bool wii, bool sciifii, bool vwii, bool verbose) {
|
||||
}
|
||||
if(sciifii)
|
||||
{
|
||||
if(verbose) printf(">> Applying Sciifii patches:\n");
|
||||
if(verbose)
|
||||
{
|
||||
TextColor(6, 1);
|
||||
printf("\t>> Applying Sciifii patches:\n");
|
||||
}
|
||||
count += apply_patch("MEM2_prot", MEM2_prot_old, sizeof(MEM2_prot_old), MEM2_prot_patch, sizeof(MEM2_prot_patch), 0, verbose);
|
||||
count += apply_patch("ES_OpenTitleContent1", ES_OpenTitleContent1_old, sizeof(ES_OpenTitleContent1_old), ES_OpenTitleContent1_patch, sizeof(ES_OpenTitleContent1_patch), 0, verbose);
|
||||
count += apply_patch("ES_OpenTitleContent2", ES_OpenTitleContent2_old, sizeof(ES_OpenTitleContent2_old), ES_OpenTitleContent2_patch, sizeof(ES_OpenTitleContent2_patch), 0, verbose);
|
||||
@ -173,7 +196,11 @@ s32 IosPatch_RUNTIME(bool wii, bool sciifii, bool vwii, bool verbose) {
|
||||
}
|
||||
if(vwii)
|
||||
{
|
||||
if(verbose) printf(">> Applying vWii patches:\n");
|
||||
if(verbose)
|
||||
{
|
||||
TextColor(6, 1);
|
||||
printf("\t>> Applying vWii patches:\n");
|
||||
}
|
||||
count += apply_patch("Kill_AntiSysTitleInstallv3_pt1", Kill_AntiSysTitleInstallv3_pt1_old, sizeof(Kill_AntiSysTitleInstallv3_pt1_old), Kill_AntiSysTitleInstallv3_pt1_patch, sizeof(Kill_AntiSysTitleInstallv3_pt1_patch), 0, verbose);
|
||||
count += apply_patch("Kill_AntiSysTitleInstallv3_pt2", Kill_AntiSysTitleInstallv3_pt2_old, sizeof(Kill_AntiSysTitleInstallv3_pt2_old), Kill_AntiSysTitleInstallv3_pt2_patch, sizeof(Kill_AntiSysTitleInstallv3_pt2_patch), 0, verbose);
|
||||
count += apply_patch("Kill_AntiSysTitleInstallv3_pt3", Kill_AntiSysTitleInstallv3_pt3_old, sizeof(Kill_AntiSysTitleInstallv3_pt3_old), Kill_AntiSysTitleInstallv3_pt3_patch, sizeof(Kill_AntiSysTitleInstallv3_pt3_patch), 0, verbose);
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
// Copyright (C) 2010 Joseph Jordan <joe.ftpii@psychlaw.com.au>
|
||||
// Copyright (C) 2012-2013 damysteryman
|
||||
// Copyright (C) 2012-2013 Christopher Bratusek <nano@tuxfamily.org>
|
||||
// Copyright (C) 2012-2015 Christopher Bratusek <nano@jpberlin.de>
|
||||
// Copyright (C) 2013 DarkMatterCore
|
||||
// Copyright (C) 2014 megazig
|
||||
// Copyright (C) 2015 FIX94
|
||||
@ -20,7 +20,7 @@
|
||||
/**
|
||||
* Version information for Libruntimeiospatch.
|
||||
*/
|
||||
#define LIB_RUNTIMEIOSPATCH_VERSION "1.5.2"
|
||||
#define LIB_RUNTIMEIOSPATCH_VERSION "1.5.3"
|
||||
|
||||
//==============================================================================
|
||||
// HW_RVL header
|
||||
@ -63,6 +63,7 @@ Wii:
|
||||
* ES SetIdentify
|
||||
* Hash Check (aka Trucha)
|
||||
* New Hash Check (aka New Trucha)
|
||||
* SSL patches
|
||||
|
||||
Sciifii:
|
||||
* MEM2 Prot
|
||||
|
@ -41,14 +41,14 @@ DATA := data/fonts \
|
||||
#---------------------------------------------------------------------------------
|
||||
|
||||
CFLAGS = -g -O2 -Wall $(MACHDEP) $(INCLUDE) $(XFLAGS)
|
||||
CXXFLAGS = -save-temps -Xassembler -aln=$@.lst $(CFLAGS)
|
||||
LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map -Wl,--section-start,.init=0x81330000
|
||||
CXXFLAGS = -save-temps -Xassembler -aln=$@.lst $(CFLAGS) $(XFLAGS)
|
||||
LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map -Wl,--section-start,.init=0x81330000,-wrap,wiiuse_register
|
||||
#LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# any extra libraries we wish to link with the project
|
||||
#---------------------------------------------------------------------------------
|
||||
LIBS := -ldi -lpng -lz -lfat -lntfs -lwiiuse -lbte -lasnd -logc -lfreetype -lmxml -lext2fs -lruntimeiospatch
|
||||
LIBS := -ldi -lpng -lz -lfat -lntfs -lwiiuse -lwupc -lbte -lasnd -logc -lfreetype -lmxml -lext2fs -lruntimeiospatch
|
||||
#---------------------------------------------------------------------------------
|
||||
# list of directories containing libraries, this must be the top level containing
|
||||
# include and lib
|
||||
|
@ -409,7 +409,7 @@ int MenuMain()
|
||||
// device symbol anzeigen
|
||||
GuiImage * viewdevice = NULL;
|
||||
|
||||
if((Options.device_icon == 1 || Options.device_icon == 3) && (Settings.device == "sd_usb" || Settings.device == "all"))
|
||||
if(Options.device_icon == 1 || Options.device_icon == 3)
|
||||
{
|
||||
bool icon = false;
|
||||
if(strncmp(vechomebrew_list_choice[i].foldername.c_str(), "sd", 2) == 0)
|
||||
@ -639,7 +639,9 @@ int MenuMain()
|
||||
if(mainWindow->GetState() != STATE_DISABLED)
|
||||
{
|
||||
// Sortieren
|
||||
if(WPAD_ButtonsDown(0) & WPAD_BUTTON_1 && Settings.current_category != 0)
|
||||
if((WPAD_ButtonsDown(0) & (WPAD_BUTTON_1 | WPAD_CLASSIC_BUTTON_Y) && Settings.current_category != 0)
|
||||
|| (WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_Y && Settings.current_category != 0)
|
||||
|| (PAD_ButtonsDown(0) & PAD_BUTTON_Y && Settings.current_category != 0))
|
||||
{
|
||||
switch (sortPrompt())
|
||||
{
|
||||
@ -676,19 +678,10 @@ int MenuMain()
|
||||
|
||||
if(!first)
|
||||
{
|
||||
if (Options.sdgecko)
|
||||
{
|
||||
xprintf("The HomebrewFilter rev%i\n= == == == == == == == =\nSD Card Gecko initialized.\n\n", SvnRev());
|
||||
}
|
||||
else if(Options.wifigecko)
|
||||
{
|
||||
if(Options.wifigecko)
|
||||
WifiGecko_Connect();
|
||||
xprintf("The HomebrewFilter rev%i\n= == == == == == == == =\nWifi Gecko connected.\n\n", SvnRev());
|
||||
}
|
||||
else
|
||||
{
|
||||
xprintf("The HomebrewFilter rev%i\n= == == == == == == == =\nUSB Gecko initialized.\n\n", SvnRev());
|
||||
}
|
||||
|
||||
xprintf("The HomebrewFilter rev%i\n= == == == == == == == =\n\n", SvnRev());
|
||||
first = true;
|
||||
}
|
||||
|
||||
@ -720,7 +713,10 @@ int MenuMain()
|
||||
menu = MENU_EXIT;
|
||||
|
||||
// ansicht wechseln
|
||||
if(((WPAD_ButtonsDown(0) & WPAD_BUTTON_2) &! (WPAD_ButtonsDown(0) & WPAD_BUTTON_1)) || normal_grid_Btn.GetState() == STATE_CLICKED)
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_2 | WPAD_CLASSIC_BUTTON_X) ||
|
||||
WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_X ||
|
||||
PAD_ButtonsDown(0) & PAD_BUTTON_X ||
|
||||
normal_grid_Btn.GetState() == STATE_CLICKED)
|
||||
{
|
||||
Settings.current_page = 1;
|
||||
if(Settings.grid)
|
||||
@ -732,21 +728,26 @@ int MenuMain()
|
||||
}
|
||||
|
||||
// wenn A gedrckt
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A) || PAD_ButtonsDown(0) & PAD_BUTTON_A)
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A) || PAD_ButtonsDown(0) & PAD_BUTTON_A
|
||||
|| WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_A)
|
||||
button = "A";
|
||||
|
||||
// wenn B gedrckt
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B) || PAD_ButtonsDown(0) & PAD_BUTTON_B)
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B) || PAD_ButtonsDown(0) & PAD_BUTTON_B
|
||||
|| WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_B)
|
||||
button = "B";
|
||||
|
||||
// Settings
|
||||
if(settings_Btn.GetState() == STATE_CLICKED)
|
||||
if(settings_Btn.GetState() == STATE_CLICKED || WPAD_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_FULL_L
|
||||
|| PAD_ButtonsDown(0) & PAD_TRIGGER_Z || WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_FULL_L)
|
||||
{
|
||||
menu = MENU_SETTINGS;
|
||||
}
|
||||
|
||||
// SD, USB
|
||||
else if(sd_usb_Btn.GetState() == STATE_CLICKED || Settings.sd_insert == -1 || Settings.sd_insert == 2
|
||||
else if(sd_usb_Btn.GetState() == STATE_CLICKED || WPAD_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_ZL
|
||||
|| WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_ZL
|
||||
|| Settings.sd_insert == -1 || Settings.sd_insert == 2
|
||||
|| Settings.usb_insert == -1 || Settings.usb_insert == 2
|
||||
#ifndef VWII
|
||||
|| Settings.dvd_insert == -1 || Settings.dvd_insert == 2
|
||||
@ -756,8 +757,7 @@ int MenuMain()
|
||||
)
|
||||
{
|
||||
int device = -1;
|
||||
if(sd_usb_Btn.GetState() == STATE_CLICKED)
|
||||
device = devicePrompt();
|
||||
device = devicePrompt();
|
||||
|
||||
if(device == 1)
|
||||
Settings.device = "sd1";
|
||||
@ -772,9 +772,9 @@ int MenuMain()
|
||||
Settings.device = "gca";
|
||||
else if(device == 6)
|
||||
Settings.device = "gcb";
|
||||
#endif
|
||||
else if(device == 7)
|
||||
Settings.device = "all";
|
||||
#endif
|
||||
|
||||
if(device != -1 || Settings.sd_insert == -1 || Settings.sd_insert == 2
|
||||
|| Settings.usb_insert == -1 || Settings.usb_insert == 2
|
||||
@ -794,7 +794,9 @@ int MenuMain()
|
||||
}
|
||||
#ifndef VWII
|
||||
// Wii, GC
|
||||
else if(wii_gc_Btn.GetState() == STATE_CLICKED)
|
||||
else if(wii_gc_Btn.GetState() == STATE_CLICKED ||
|
||||
WPAD_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_ZR ||
|
||||
WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_ZR)
|
||||
{
|
||||
int choice = systemPrompt();
|
||||
|
||||
@ -817,7 +819,8 @@ int MenuMain()
|
||||
#endif
|
||||
|
||||
// Power button
|
||||
else if(power_Btn.GetState() == STATE_CLICKED || WPAD_ButtonsDown(0) & (WPAD_BUTTON_HOME | WPAD_CLASSIC_BUTTON_HOME) || PAD_ButtonsDown(0) & PAD_BUTTON_START)
|
||||
else if(power_Btn.GetState() == STATE_CLICKED || WPAD_ButtonsDown(0) & (WPAD_BUTTON_HOME | WPAD_CLASSIC_BUTTON_HOME)
|
||||
|| PAD_ButtonsDown(0) & PAD_BUTTON_START || WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_HOME)
|
||||
{
|
||||
power_Btn.ResetState();
|
||||
if(endPrompt() == MENU_EXIT)
|
||||
@ -825,7 +828,8 @@ int MenuMain()
|
||||
}
|
||||
|
||||
// Loader button
|
||||
else if(loader_Btn.GetState() == STATE_CLICKED || WPAD_ButtonsDown(0) & (WPAD_BUTTON_HOME | WPAD_CLASSIC_BUTTON_HOME) || PAD_ButtonsDown(0) & PAD_BUTTON_START)
|
||||
else if(loader_Btn.GetState() == STATE_CLICKED || WPAD_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_FULL_R
|
||||
|| WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_FULL_R)
|
||||
{
|
||||
loader_Btn.ResetState();
|
||||
if(loaderPrompt() == MENU_EXIT)
|
||||
@ -842,26 +846,34 @@ int MenuMain()
|
||||
// eine Seite weiter bzw zurck
|
||||
else if((WPAD_ButtonsDown(0) & (WPAD_BUTTON_RIGHT | WPAD_CLASSIC_BUTTON_RIGHT) && !Options.navigation) ||
|
||||
(WPAD_ButtonsDown(0) & (WPAD_BUTTON_PLUS | WPAD_CLASSIC_BUTTON_PLUS) && Options.navigation) ||
|
||||
(WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_RIGHT && !Options.navigation) ||
|
||||
(WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_PLUS && Options.navigation) ||
|
||||
PAD_ButtonsDown(0) & PAD_BUTTON_RIGHT || rightBtn.GetState() == STATE_CLICKED ||
|
||||
(WPAD_ButtonsDown(0) & (WPAD_BUTTON_LEFT | WPAD_CLASSIC_BUTTON_LEFT) && !Options.navigation) ||
|
||||
(WPAD_ButtonsDown(0) & (WPAD_BUTTON_MINUS | WPAD_CLASSIC_BUTTON_MINUS) && Options.navigation) ||
|
||||
(WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_LEFT && !Options.navigation) ||
|
||||
(WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_MINUS && Options.navigation) ||
|
||||
PAD_ButtonsDown(0) & PAD_BUTTON_LEFT || leftBtn.GetState() == STATE_CLICKED)
|
||||
{
|
||||
// Abbrechen Seite zurck
|
||||
if((WPAD_ButtonsDown(0) & (WPAD_BUTTON_RIGHT | WPAD_CLASSIC_BUTTON_RIGHT) && !Options.navigation) ||
|
||||
(WPAD_ButtonsDown(0) & (WPAD_BUTTON_PLUS | WPAD_CLASSIC_BUTTON_PLUS) && Options.navigation) ||
|
||||
(WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_RIGHT && !Options.navigation) ||
|
||||
(WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_PLUS && Options.navigation) ||
|
||||
PAD_ButtonsDown(0) & PAD_BUTTON_RIGHT || rightBtn.GetState() == STATE_CLICKED)
|
||||
previous_page = false;
|
||||
|
||||
// Abbrechen Seite weiter
|
||||
if((WPAD_ButtonsDown(0) & (WPAD_BUTTON_LEFT | WPAD_CLASSIC_BUTTON_LEFT) && !Options.navigation) ||
|
||||
(WPAD_ButtonsDown(0) & (WPAD_BUTTON_MINUS | WPAD_CLASSIC_BUTTON_MINUS) && Options.navigation) ||
|
||||
(WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_LEFT && !Options.navigation) ||
|
||||
(WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_MINUS && Options.navigation) ||
|
||||
PAD_ButtonsDown(0) & PAD_BUTTON_LEFT || leftBtn.GetState() == STATE_CLICKED)
|
||||
next_page = false;
|
||||
|
||||
int page = Settings.current_page;
|
||||
bool change = false;
|
||||
if(next_page || rightBtn.GetState() == STATE_CLICKED || (WPAD_ButtonsDown(0) & (WPAD_BUTTON_PLUS | WPAD_CLASSIC_BUTTON_PLUS) && Options.navigation))
|
||||
if(next_page || rightBtn.GetState() == STATE_CLICKED || (WPAD_ButtonsDown(0) & (WPAD_BUTTON_PLUS | WPAD_CLASSIC_BUTTON_PLUS) && Options.navigation) || WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_PLUS)
|
||||
{
|
||||
rightBtn.ResetState();
|
||||
Settings.current_page++;
|
||||
@ -877,7 +889,7 @@ int MenuMain()
|
||||
change = true;
|
||||
}
|
||||
|
||||
if(previous_page || leftBtn.GetState() == STATE_CLICKED || (WPAD_ButtonsDown(0) & (WPAD_BUTTON_MINUS | WPAD_CLASSIC_BUTTON_MINUS) && Options.navigation))
|
||||
if(previous_page || leftBtn.GetState() == STATE_CLICKED || (WPAD_ButtonsDown(0) & (WPAD_BUTTON_MINUS | WPAD_CLASSIC_BUTTON_MINUS) && Options.navigation) || WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_MINUS)
|
||||
{
|
||||
leftBtn.ResetState();
|
||||
Settings.current_page--;
|
||||
@ -955,6 +967,8 @@ int MenuMain()
|
||||
// eine Kategorie weiter
|
||||
else if((WPAD_ButtonsDown(0) & (WPAD_BUTTON_PLUS | WPAD_CLASSIC_BUTTON_PLUS) && !Options.navigation) ||
|
||||
(WPAD_ButtonsDown(0) & (WPAD_BUTTON_RIGHT | WPAD_CLASSIC_BUTTON_RIGHT) && Options.navigation) ||
|
||||
(WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_PLUS && !Options.navigation) ||
|
||||
(WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_RIGHT && Options.navigation) ||
|
||||
PAD_ButtonsDown(0) & PAD_TRIGGER_R || plusBtn.GetState() == STATE_CLICKED)
|
||||
{
|
||||
Next_Category();
|
||||
@ -964,6 +978,8 @@ int MenuMain()
|
||||
// eine Kategorie zurck
|
||||
else if((WPAD_ButtonsDown(0) & (WPAD_BUTTON_MINUS | WPAD_CLASSIC_BUTTON_MINUS) && !Options.navigation) ||
|
||||
(WPAD_ButtonsDown(0) & (WPAD_BUTTON_LEFT | WPAD_CLASSIC_BUTTON_LEFT) && Options.navigation) ||
|
||||
(WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_MINUS && !Options.navigation) ||
|
||||
(WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_LEFT && Options.navigation) ||
|
||||
PAD_ButtonsDown(0) & PAD_TRIGGER_L || minusBtn.GetState() == STATE_CLICKED)
|
||||
{
|
||||
Previous_Category();
|
||||
@ -1052,7 +1068,7 @@ int MenuMain()
|
||||
if(AppsBtn[i]->GetState() == STATE_CLICKED && button == "B" && !grab)
|
||||
{
|
||||
AppsBtn[i]->ResetState();
|
||||
if(Settings.current_category != 0 && strcasecmp(Settings.code,"NULL") == 0 && WPAD_ButtonsDown(0) & WPAD_BUTTON_B)
|
||||
if(Settings.current_category != 0 && strcasecmp(Settings.code,"NULL") == 0 && (WPAD_ButtonsDown(0) & (WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B) || WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_B))
|
||||
{
|
||||
pointer = new GuiImageData(Theme.player_grab);
|
||||
grab = true;
|
||||
@ -1191,7 +1207,7 @@ int MenuMain()
|
||||
}
|
||||
|
||||
// wenn b losgelassen wurde
|
||||
if(WPAD_ButtonsUp(0) & WPAD_BUTTON_B)
|
||||
if(WPAD_ButtonsUp(0) & (WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B) || WUPC_ButtonsUp(0) & WPAD_CLASSIC_BUTTON_B)
|
||||
{
|
||||
grab = false;
|
||||
pointer = new GuiImageData(Theme.player_point);
|
||||
|
@ -80,7 +80,7 @@ int MenuSettingsFile()
|
||||
sprintf(options.name[i++], tr("Device icon"));
|
||||
sprintf(options.name[i++], tr("Wiiload IOS"));
|
||||
sprintf(options.name[i++], tr("Wiiload IOS Reload"));
|
||||
sprintf(options.name[i++], tr("SD Gecko"));
|
||||
sprintf(options.name[i++], tr("SD Card Debug Log"));
|
||||
#ifndef VWII
|
||||
sprintf(options.name[i++], tr("BootMii in Boot2"));
|
||||
#endif
|
||||
@ -150,7 +150,8 @@ int MenuSettingsFile()
|
||||
ret = optionBrowser.GetChangedOption();
|
||||
ret2 = optionBrowser.GetClickedOption();
|
||||
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_RIGHT | WPAD_CLASSIC_BUTTON_RIGHT) || PAD_ButtonsDown(0) & PAD_BUTTON_RIGHT)
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_RIGHT | WPAD_CLASSIC_BUTTON_RIGHT) || PAD_ButtonsDown(0) & PAD_BUTTON_RIGHT
|
||||
|| WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_RIGHT)
|
||||
{
|
||||
change = 0;
|
||||
switch (ret)
|
||||
@ -236,7 +237,8 @@ int MenuSettingsFile()
|
||||
optionBrowser.TriggerUpdate();
|
||||
}
|
||||
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_LEFT | WPAD_CLASSIC_BUTTON_LEFT) || PAD_ButtonsDown(0) & PAD_BUTTON_LEFT)
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_LEFT | WPAD_CLASSIC_BUTTON_LEFT) || PAD_ButtonsDown(0) & PAD_BUTTON_LEFT
|
||||
|| WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_LEFT)
|
||||
{
|
||||
change = 0;
|
||||
switch (ret)
|
||||
@ -478,7 +480,8 @@ int MenuSettingsFile()
|
||||
optionBrowser.TriggerUpdate();
|
||||
}
|
||||
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B) || PAD_ButtonsDown(0) & PAD_BUTTON_B)
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B) || PAD_ButtonsDown(0) & PAD_BUTTON_B
|
||||
|| WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_B)
|
||||
{
|
||||
if(focus == 0)
|
||||
{
|
||||
|
@ -162,7 +162,8 @@ int MenuSettingsFont()
|
||||
optionBrowser.TriggerUpdate();
|
||||
}
|
||||
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B) || PAD_ButtonsDown(0) & PAD_BUTTON_B)
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B) || PAD_ButtonsDown(0) & PAD_BUTTON_B
|
||||
|| WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_B)
|
||||
{
|
||||
if(focus == 0)
|
||||
{
|
||||
|
@ -164,7 +164,8 @@ int MenuSettingsLanguage()
|
||||
optionBrowser.TriggerUpdate();
|
||||
}
|
||||
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B) || PAD_ButtonsDown(0) & PAD_BUTTON_B)
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B) || PAD_ButtonsDown(0) & PAD_BUTTON_B
|
||||
|| WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_B)
|
||||
{
|
||||
if(focus == 0)
|
||||
{
|
||||
|
@ -35,7 +35,7 @@ int MenuSettingsNetwork()
|
||||
OptionList options;
|
||||
|
||||
sprintf(options.name[i++], tr("Auto Connect"));
|
||||
sprintf(options.name[i++], tr("Enable Wifi Gecko"));
|
||||
sprintf(options.name[i++], tr("Wifi Debug Log"));
|
||||
sprintf(options.name[i++], tr("Update Info"));
|
||||
options.length = i;
|
||||
|
||||
@ -100,7 +100,8 @@ int MenuSettingsNetwork()
|
||||
|
||||
ret = optionBrowser.GetChangedOption();
|
||||
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_RIGHT | WPAD_CLASSIC_BUTTON_RIGHT) || PAD_ButtonsDown(0) & PAD_BUTTON_RIGHT)
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_RIGHT | WPAD_CLASSIC_BUTTON_RIGHT) || PAD_ButtonsDown(0) & PAD_BUTTON_RIGHT
|
||||
|| WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_RIGHT)
|
||||
{
|
||||
change = 0;
|
||||
switch (ret)
|
||||
@ -132,7 +133,8 @@ int MenuSettingsNetwork()
|
||||
HaltResumeGui();
|
||||
}
|
||||
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_LEFT | WPAD_CLASSIC_BUTTON_LEFT) || PAD_ButtonsDown(0) & PAD_BUTTON_LEFT)
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_LEFT | WPAD_CLASSIC_BUTTON_LEFT) || PAD_ButtonsDown(0) & PAD_BUTTON_LEFT
|
||||
|| WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_LEFT)
|
||||
{
|
||||
change = 0;
|
||||
switch (ret)
|
||||
@ -189,7 +191,8 @@ int MenuSettingsNetwork()
|
||||
if(optionBrowser.GetClickedOption() != -1)
|
||||
optionBrowser.TriggerUpdate();
|
||||
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B) || PAD_ButtonsDown(0) & PAD_BUTTON_B)
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B) || PAD_ButtonsDown(0) & PAD_BUTTON_B
|
||||
|| WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_B)
|
||||
{
|
||||
if(focus == 0)
|
||||
{
|
||||
|
@ -159,7 +159,8 @@ int MenuSettingsTheme()
|
||||
optionBrowser.TriggerUpdate();
|
||||
}
|
||||
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B) || PAD_ButtonsDown(0) & PAD_BUTTON_B)
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B) || PAD_ButtonsDown(0) & PAD_BUTTON_B
|
||||
|| WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_B)
|
||||
{
|
||||
if(focus == 0)
|
||||
{
|
||||
|
@ -55,11 +55,11 @@ void CheckVersion(void)
|
||||
if(Settings.checkrev == -1)
|
||||
{
|
||||
#ifdef STBOOTVWII
|
||||
struct block file = downloadfile("http://www.nanolx.org/hbf/DOL.st.vwii/revisions.st.vwii");
|
||||
struct block file = downloadfile("http://www.nanolx.org/hbf/DOL.st.vwii/revisions");
|
||||
#elif VWII
|
||||
struct block file = downloadfile("http://www.nanolx.org/hbf/DOL.vwii/revisions.vwii");
|
||||
struct block file = downloadfile("http://www.nanolx.org/hbf/DOL.vwii/revisions");
|
||||
#elif STBOOT
|
||||
struct block file = downloadfile("http://www.nanolx.org/hbf/DOL.st/revisions.st");
|
||||
struct block file = downloadfile("http://www.nanolx.org/hbf/DOL.st/revisions");
|
||||
#else
|
||||
struct block file = downloadfile("http://www.nanolx.org/hbf/DOL/revisions");
|
||||
#endif
|
||||
|
@ -14,11 +14,11 @@ string CheckNewVersions()
|
||||
string revs = "error";
|
||||
char buffer[100];
|
||||
#ifdef STBOOTVWII
|
||||
sprintf(buffer, "http://www.nanolx.org/hbf/DOL.st.vwii/revisions.st.vwii");
|
||||
sprintf(buffer, "http://www.nanolx.org/hbf/DOL.st.vwii/revisions");
|
||||
#elif VWII
|
||||
sprintf(buffer, "http://www.nanolx.org/hbf/DOL.vwii/revisions.vwii");
|
||||
sprintf(buffer, "http://www.nanolx.org/hbf/DOL.vwii/revisions");
|
||||
#elif STBOOT
|
||||
sprintf(buffer, "http://www.nanolx.org/hbf/DOL.st/revisions.st");
|
||||
sprintf(buffer, "http://www.nanolx.org/hbf/DOL.st/revisions");
|
||||
#else
|
||||
sprintf(buffer, "http://www.nanolx.org/hbf/DOL/revisions");
|
||||
#endif
|
||||
@ -57,7 +57,6 @@ string new_update(string rev, string filename)
|
||||
sprintf(url, "http://www.nanolx.org/hbf/DOL.vwii/Beta/%s", filename.c_str());
|
||||
else
|
||||
sprintf(url, "http://www.nanolx.org/hbf/DOL.vwii/rev%s/%s", rev.c_str(), filename.c_str());
|
||||
|
||||
#elif STBOOT
|
||||
if(rev == "Beta")
|
||||
sprintf(url, "http://www.nanolx.org/hbf/DOL.st/Beta/%s", filename.c_str());
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include <network.h>
|
||||
#include "xprintf.h"
|
||||
|
||||
#define DESTINATION_IP "192.168.1.4"
|
||||
#define DESTINATION_IP "192.168.178.21"
|
||||
#define DESTINATION_PORT 4405
|
||||
|
||||
static int connection = -1;
|
||||
|
@ -94,7 +94,8 @@ string AddApp(const char *AppName)
|
||||
{
|
||||
usleep(100);
|
||||
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_PLUS | WPAD_CLASSIC_BUTTON_PLUS) || PAD_ButtonsDown(0) & PAD_TRIGGER_R)
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_PLUS | WPAD_CLASSIC_BUTTON_PLUS) || PAD_ButtonsDown(0) & PAD_TRIGGER_R
|
||||
|| WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_PLUS)
|
||||
{
|
||||
kategorieInt++;
|
||||
if ( kategorieInt >= (signed)AvailableCategory.categories.size() )
|
||||
@ -105,7 +106,8 @@ string AddApp(const char *AppName)
|
||||
HaltResumeGui();
|
||||
}
|
||||
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_MINUS | WPAD_CLASSIC_BUTTON_MINUS) || PAD_ButtonsDown(0) & PAD_TRIGGER_L)
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_MINUS | WPAD_CLASSIC_BUTTON_MINUS) || PAD_ButtonsDown(0) & PAD_TRIGGER_L
|
||||
|| WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_MINUS)
|
||||
{
|
||||
kategorieInt--;
|
||||
if ( kategorieInt < 1 )
|
||||
|
@ -59,7 +59,7 @@ AppInfo(const char *title, string dir, u8* icon)
|
||||
|
||||
GuiImage * viewdevice = NULL;
|
||||
|
||||
if((Options.device_icon == 2 || Options.device_icon == 3) && (Settings.device == "sd_usb" || Settings.device == "all"))
|
||||
if(Options.device_icon == 2 || Options.device_icon == 3)
|
||||
{
|
||||
bool icon = false;
|
||||
if(strncmp(dir.c_str(), "sd", 2) == 0)
|
||||
@ -283,7 +283,8 @@ AppInfo(const char *title, string dir, u8* icon)
|
||||
{
|
||||
usleep(100);
|
||||
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_UP | WPAD_CLASSIC_BUTTON_UP) || PAD_ButtonsDown(0) & PAD_BUTTON_UP)
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_UP | WPAD_CLASSIC_BUTTON_UP) || PAD_ButtonsDown(0) & PAD_BUTTON_UP
|
||||
|| WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_UP)
|
||||
{
|
||||
int z = description.text_up();
|
||||
|
||||
@ -294,7 +295,8 @@ AppInfo(const char *title, string dir, u8* icon)
|
||||
HaltResumeGui();
|
||||
}
|
||||
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_DOWN | WPAD_CLASSIC_BUTTON_DOWN) || PAD_ButtonsDown(0) & PAD_BUTTON_DOWN)
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_DOWN | WPAD_CLASSIC_BUTTON_DOWN) || PAD_ButtonsDown(0) & PAD_BUTTON_DOWN
|
||||
|| WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_DOWN)
|
||||
{
|
||||
int z = description.text_down(number);
|
||||
|
||||
@ -305,14 +307,16 @@ AppInfo(const char *title, string dir, u8* icon)
|
||||
HaltResumeGui();
|
||||
}
|
||||
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_PLUS | WPAD_CLASSIC_BUTTON_PLUS) || PAD_ButtonsDown(0) & PAD_TRIGGER_R)
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_PLUS | WPAD_CLASSIC_BUTTON_PLUS) || PAD_ButtonsDown(0) & PAD_TRIGGER_R
|
||||
|| WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_PLUS)
|
||||
{
|
||||
sprintf(SelectIos, tr("Start with IOS %i (-/+)"), nextIos());
|
||||
SelectIosTxt.SetText(SelectIos);
|
||||
HaltResumeGui();
|
||||
}
|
||||
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_MINUS | WPAD_CLASSIC_BUTTON_MINUS) || PAD_ButtonsDown(0) & PAD_TRIGGER_L)
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_MINUS | WPAD_CLASSIC_BUTTON_MINUS) || PAD_ButtonsDown(0) & PAD_TRIGGER_L
|
||||
|| WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_MINUS)
|
||||
{
|
||||
sprintf(SelectIos, tr("Start with IOS %i (-/+)"), previousIos());
|
||||
SelectIosTxt.SetText(SelectIos);
|
||||
|
@ -22,7 +22,11 @@ int devicePrompt()
|
||||
bool stop = false;
|
||||
int device = -1;
|
||||
|
||||
#ifndef VWII
|
||||
GuiWindow promptWindow(328,64);
|
||||
#else
|
||||
GuiWindow promptWindow(144,64);
|
||||
#endif
|
||||
promptWindow.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
||||
promptWindow.SetPosition(-135, 280);
|
||||
GuiTrigger trigA;
|
||||
@ -31,7 +35,11 @@ int devicePrompt()
|
||||
trigB.SetButtonOnlyTrigger(-1, WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B, PAD_BUTTON_B);
|
||||
|
||||
// Hintergrund
|
||||
#ifndef VWII
|
||||
GuiImageData dialogBox(Theme.choice_large);
|
||||
#else
|
||||
GuiImageData dialogBox(Theme.choice);
|
||||
#endif
|
||||
GuiImage dialogBoxImg(&dialogBox);
|
||||
|
||||
// button data
|
||||
@ -48,9 +56,9 @@ int devicePrompt()
|
||||
GuiImageData gca_BtnImgDataOver(Theme.gca_active);
|
||||
GuiImageData gcb_BtnImgData(Theme.gcb_inactive);
|
||||
GuiImageData gcb_BtnImgDataOver(Theme.gcb_active);
|
||||
#endif
|
||||
GuiImageData all_BtnImgData(Theme.all_inactive);
|
||||
GuiImageData all_BtnImgDataOver(Theme.all_active);
|
||||
#endif
|
||||
|
||||
// button
|
||||
GuiImage sd_BtnImg(&sd_BtnImgData);
|
||||
@ -60,8 +68,8 @@ int devicePrompt()
|
||||
GuiImage dvd_BtnImg(&dvd_BtnImgData);
|
||||
GuiImage gca_BtnImg(&gca_BtnImgData);
|
||||
GuiImage gcb_BtnImg(&gca_BtnImgData);
|
||||
#endif
|
||||
GuiImage all_BtnImg(&all_BtnImgData);
|
||||
#endif
|
||||
|
||||
// button over
|
||||
GuiImage sd_BtnImgOver(&sd_BtnImgDataOver);
|
||||
@ -71,8 +79,8 @@ int devicePrompt()
|
||||
GuiImage dvd_BtnImgOver(&dvd_BtnImgDataOver);
|
||||
GuiImage gca_BtnImgOver(&gca_BtnImgDataOver);
|
||||
GuiImage gcb_BtnImgOver(&gca_BtnImgDataOver);
|
||||
#endif
|
||||
GuiImage all_BtnImgOver(&all_BtnImgDataOver);
|
||||
#endif
|
||||
|
||||
GuiButton sd_Btn(sd_BtnImgData.GetWidth(), sd_BtnImgData.GetHeight());
|
||||
sd_Btn.SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE);
|
||||
@ -115,14 +123,14 @@ int devicePrompt()
|
||||
gcb_Btn.SetImage(&gcb_BtnImg);
|
||||
gcb_Btn.SetImageOver(&gcb_BtnImgOver);
|
||||
gcb_Btn.SetTrigger(&trigA);
|
||||
#endif
|
||||
|
||||
GuiButton all_Btn(all_BtnImgData.GetWidth(), all_BtnImgData.GetHeight());
|
||||
all_Btn.SetAlignment(ALIGN_RIGHT, ALIGN_MIDDLE);
|
||||
all_Btn.SetPosition(-8, 0);
|
||||
all_Btn.SetImage(&all_BtnImg);
|
||||
all_Btn.SetImageOver(&all_BtnImgOver);
|
||||
all_Btn.SetTrigger(&trigA);
|
||||
|
||||
#endif
|
||||
GuiButton back(0, 0);
|
||||
back.SetTrigger(&trigB);
|
||||
|
||||
@ -134,8 +142,8 @@ int devicePrompt()
|
||||
promptWindow.Append(&dvd_Btn);
|
||||
promptWindow.Append(&gca_Btn);
|
||||
promptWindow.Append(&gcb_Btn);
|
||||
#endif
|
||||
promptWindow.Append(&all_Btn);
|
||||
#endif
|
||||
promptWindow.Append(&back);
|
||||
|
||||
HaltGui();
|
||||
@ -183,13 +191,13 @@ int devicePrompt()
|
||||
device = 6;
|
||||
stop = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
if(all_Btn.GetState() == STATE_CLICKED)
|
||||
{
|
||||
device = 7;
|
||||
stop = true;
|
||||
}
|
||||
|
||||
#endif
|
||||
if(back.GetState() == STATE_CLICKED)
|
||||
stop = true;
|
||||
}
|
||||
|
@ -121,7 +121,8 @@ MetaEdit(string dir)
|
||||
{
|
||||
usleep(100);
|
||||
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_UP | WPAD_CLASSIC_BUTTON_UP) || PAD_ButtonsDown(0) & PAD_BUTTON_UP)
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_UP | WPAD_CLASSIC_BUTTON_UP) || PAD_ButtonsDown(0) & PAD_BUTTON_UP
|
||||
|| WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_UP)
|
||||
{
|
||||
startline = meta.text_up();
|
||||
|
||||
@ -131,7 +132,8 @@ MetaEdit(string dir)
|
||||
HaltResumeGui();
|
||||
}
|
||||
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_DOWN | WPAD_CLASSIC_BUTTON_DOWN) || PAD_ButtonsDown(0) & PAD_BUTTON_DOWN)
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_DOWN | WPAD_CLASSIC_BUTTON_DOWN) || PAD_ButtonsDown(0) & PAD_BUTTON_DOWN
|
||||
|| WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_DOWN)
|
||||
{
|
||||
startline = meta.text_down(number);
|
||||
|
||||
|
@ -75,6 +75,7 @@ endPrompt()
|
||||
GuiButton wiiu(btn.GetWidth(), btn.GetHeight());
|
||||
wiiu.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
||||
wiiu.SetPosition(0, 75);
|
||||
wiiu.SetLabel(&wiiuTxt);
|
||||
wiiu.SetImage(&wiiuImg);
|
||||
wiiu.SetImageOver(&wiiuImgOver);
|
||||
wiiu.SetTrigger(&trigA);
|
||||
@ -83,8 +84,12 @@ endPrompt()
|
||||
GuiButton hbf(btn.GetWidth(), btn.GetHeight());
|
||||
hbf.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
||||
hbf.SetPosition(0, 90);
|
||||
#ifndef VWII
|
||||
if(get_bootmii() != 0)
|
||||
hbf.SetPosition(0, 140);
|
||||
#else
|
||||
hbf.SetPosition(0, 140);
|
||||
#endif
|
||||
hbf.SetLabel(&hbfTxt);
|
||||
hbf.SetImage(&hbfImg);
|
||||
hbf.SetImageOver(&hbfImgOver);
|
||||
@ -94,8 +99,12 @@ endPrompt()
|
||||
GuiButton systemmenu(btn.GetWidth(), btn.GetHeight());
|
||||
systemmenu.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
||||
systemmenu.SetPosition(0, 180);
|
||||
#ifndef VWII
|
||||
if(get_bootmii() != 0)
|
||||
systemmenu.SetPosition(0, 205);
|
||||
#else
|
||||
systemmenu.SetPosition(0, 205);
|
||||
#endif
|
||||
systemmenu.SetLabel(&systemmenuTxt);
|
||||
systemmenu.SetImage(&systemmenuImg);
|
||||
systemmenu.SetImageOver(&systemmenuImgOver);
|
||||
@ -121,6 +130,8 @@ endPrompt()
|
||||
#ifndef VWII
|
||||
if(get_bootmii() != 0)
|
||||
promptWindow.Append(&bootmii);
|
||||
#else
|
||||
promptWindow.Append(&wiiu);
|
||||
#endif
|
||||
promptWindow.Append(&systemmenu);
|
||||
promptWindow.Append(&shutdown);
|
||||
|
@ -88,7 +88,8 @@ string eraseCategory()
|
||||
{
|
||||
usleep(100);
|
||||
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_PLUS | WPAD_CLASSIC_BUTTON_PLUS) || PAD_ButtonsDown(0) & PAD_TRIGGER_R)
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_PLUS | WPAD_CLASSIC_BUTTON_PLUS) || PAD_ButtonsDown(0) & PAD_TRIGGER_R
|
||||
|| WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_PLUS)
|
||||
{
|
||||
kategorieInt++;
|
||||
if ( kategorieInt >= (signed)AvailableCategory.categories.size() )
|
||||
@ -99,7 +100,8 @@ string eraseCategory()
|
||||
HaltResumeGui();
|
||||
}
|
||||
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_MINUS | WPAD_CLASSIC_BUTTON_MINUS) || PAD_ButtonsDown(0) & PAD_TRIGGER_L)
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_MINUS | WPAD_CLASSIC_BUTTON_MINUS) || PAD_ButtonsDown(0) & PAD_TRIGGER_L
|
||||
|| WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_MINUS)
|
||||
{
|
||||
kategorieInt--;
|
||||
if ( kategorieInt < 1 )
|
||||
|
@ -219,7 +219,8 @@ string FontList()
|
||||
{
|
||||
usleep(100);
|
||||
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_UP | WPAD_CLASSIC_BUTTON_UP) || PAD_ButtonsDown(0) & PAD_BUTTON_UP)
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_UP | WPAD_CLASSIC_BUTTON_UP) || PAD_ButtonsDown(0) & PAD_BUTTON_UP
|
||||
|| WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_UP)
|
||||
{
|
||||
selection--;
|
||||
if(selection < 0)
|
||||
@ -237,7 +238,8 @@ string FontList()
|
||||
HaltResumeGui();
|
||||
}
|
||||
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_DOWN | WPAD_CLASSIC_BUTTON_DOWN) || PAD_ButtonsDown(0) & PAD_BUTTON_DOWN)
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_DOWN | WPAD_CLASSIC_BUTTON_DOWN) || PAD_ButtonsDown(0) & PAD_BUTTON_DOWN
|
||||
|| WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_DOWN)
|
||||
{
|
||||
selection++;
|
||||
if(selection == (signed)fonts.size())
|
||||
@ -257,13 +259,15 @@ string FontList()
|
||||
HaltResumeGui();
|
||||
}
|
||||
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A) || PAD_ButtonsDown(0) & PAD_BUTTON_A)
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A) || PAD_ButtonsDown(0) & PAD_BUTTON_A
|
||||
|| WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_A)
|
||||
{
|
||||
downloadfont = fonts[selection + textScrollPos];
|
||||
stop = true;
|
||||
}
|
||||
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B) || PAD_ButtonsDown(0) & PAD_BUTTON_B)
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B) || PAD_ButtonsDown(0) & PAD_BUTTON_B
|
||||
|| WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_B)
|
||||
{
|
||||
downloadfont = "NULL";
|
||||
stop = true;
|
||||
|
@ -220,7 +220,8 @@ string LanguageList()
|
||||
{
|
||||
usleep(100);
|
||||
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_UP | WPAD_CLASSIC_BUTTON_UP) || PAD_ButtonsDown(0) & PAD_BUTTON_UP)
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_UP | WPAD_CLASSIC_BUTTON_UP) || PAD_ButtonsDown(0) & PAD_BUTTON_UP
|
||||
|| WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_UP)
|
||||
{
|
||||
selection--;
|
||||
if(selection < 0)
|
||||
@ -238,7 +239,8 @@ string LanguageList()
|
||||
HaltResumeGui();
|
||||
}
|
||||
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_DOWN | WPAD_CLASSIC_BUTTON_DOWN) || PAD_ButtonsDown(0) & PAD_BUTTON_DOWN)
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_DOWN | WPAD_CLASSIC_BUTTON_DOWN) || PAD_ButtonsDown(0) & PAD_BUTTON_DOWN
|
||||
|| WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_DOWN)
|
||||
{
|
||||
selection++;
|
||||
if(selection == (signed)languages.size())
|
||||
@ -258,13 +260,15 @@ string LanguageList()
|
||||
HaltResumeGui();
|
||||
}
|
||||
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A) || PAD_ButtonsDown(0) & PAD_BUTTON_A)
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A) || PAD_ButtonsDown(0) & PAD_BUTTON_A
|
||||
|| WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_A)
|
||||
{
|
||||
downloadlanguage = languages[selection + textScrollPos];
|
||||
stop = true;
|
||||
}
|
||||
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B) || PAD_ButtonsDown(0) & PAD_BUTTON_B)
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B) || PAD_ButtonsDown(0) & PAD_BUTTON_B
|
||||
|| WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_B)
|
||||
{
|
||||
downloadlanguage = "NULL";
|
||||
stop = true;
|
||||
|
@ -43,7 +43,7 @@ bool check_segui()
|
||||
segui_loc = "dvd1:/apps/SettingsEditorGUI/boot.dol";
|
||||
return true;
|
||||
}
|
||||
else if(opendir(check_path("gca:/apps/Settings Editor GUI/").c_str()) != NULL)
|
||||
else if(opendir(check_path("gca:/apps/SettingsEditorGUI/").c_str()) != NULL)
|
||||
{
|
||||
segui_loc = "gca:/apps/SettingsEditorGUI/boot.dol";
|
||||
return true;
|
||||
@ -83,7 +83,6 @@ loaderPrompt()
|
||||
bool stop = false;
|
||||
int menu = 0;
|
||||
|
||||
listIOS();
|
||||
#ifndef VWII
|
||||
if( ! priicheck )
|
||||
{
|
||||
@ -92,11 +91,7 @@ loaderPrompt()
|
||||
}
|
||||
#endif
|
||||
bool have_segui;
|
||||
if( ! seguicheck )
|
||||
{
|
||||
seguicheck = 1;
|
||||
have_segui = check_segui();
|
||||
}
|
||||
have_segui = check_segui();
|
||||
|
||||
GuiWindow promptWindow(520,360);
|
||||
promptWindow.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE);
|
||||
|
@ -111,19 +111,22 @@ void MoveCategory(int moveCategoryNr, string &Kategorie1, bool &vor, string &Kat
|
||||
{
|
||||
usleep(100);
|
||||
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_PLUS | WPAD_CLASSIC_BUTTON_PLUS) || PAD_ButtonsDown(0) & PAD_TRIGGER_R)
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_PLUS | WPAD_CLASSIC_BUTTON_PLUS) || PAD_ButtonsDown(0) & PAD_TRIGGER_R
|
||||
|| WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_PLUS)
|
||||
{
|
||||
vor = false;
|
||||
zeile3_2Txt.SetText(tr("after"));
|
||||
}
|
||||
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_MINUS | WPAD_CLASSIC_BUTTON_MINUS) || PAD_ButtonsDown(0) & PAD_TRIGGER_L)
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_MINUS | WPAD_CLASSIC_BUTTON_MINUS) || PAD_ButtonsDown(0) & PAD_TRIGGER_L
|
||||
|| WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_MINUS)
|
||||
{
|
||||
vor = true;
|
||||
zeile3_2Txt.SetText(tr("before"));
|
||||
}
|
||||
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_UP | WPAD_CLASSIC_BUTTON_UP) || PAD_ButtonsDown(0) & PAD_BUTTON_UP)
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_UP | WPAD_CLASSIC_BUTTON_UP) || PAD_ButtonsDown(0) & PAD_BUTTON_UP
|
||||
|| WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_UP)
|
||||
{
|
||||
CategoryInt--;
|
||||
|
||||
@ -134,7 +137,8 @@ void MoveCategory(int moveCategoryNr, string &Kategorie1, bool &vor, string &Kat
|
||||
HaltResumeGui();
|
||||
}
|
||||
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_DOWN | WPAD_CLASSIC_BUTTON_DOWN) || PAD_ButtonsDown(0) & PAD_BUTTON_DOWN)
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_DOWN | WPAD_CLASSIC_BUTTON_DOWN) || PAD_ButtonsDown(0) & PAD_BUTTON_DOWN
|
||||
|| WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_DOWN)
|
||||
{
|
||||
CategoryInt++;
|
||||
|
||||
@ -160,4 +164,4 @@ void MoveCategory(int moveCategoryNr, string &Kategorie1, bool &vor, string &Kat
|
||||
mainWindow->Remove(&promptWindow);
|
||||
mainWindow->SetState(STATE_DEFAULT);
|
||||
ResumeGui();
|
||||
}
|
||||
}
|
||||
|
@ -106,7 +106,8 @@ revtext(const char *msg)
|
||||
{
|
||||
usleep(100);
|
||||
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_UP | WPAD_CLASSIC_BUTTON_UP) || PAD_ButtonsDown(0) & PAD_BUTTON_UP)
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_UP | WPAD_CLASSIC_BUTTON_UP) || PAD_ButtonsDown(0) & PAD_BUTTON_UP
|
||||
|| WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_UP)
|
||||
{
|
||||
int z = revtext.text_up();
|
||||
|
||||
@ -117,7 +118,8 @@ revtext(const char *msg)
|
||||
HaltResumeGui();
|
||||
}
|
||||
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_DOWN | WPAD_CLASSIC_BUTTON_DOWN) || PAD_ButtonsDown(0) & PAD_BUTTON_DOWN)
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_DOWN | WPAD_CLASSIC_BUTTON_DOWN) || PAD_ButtonsDown(0) & PAD_BUTTON_DOWN
|
||||
|| WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_DOWN)
|
||||
{
|
||||
int z = revtext.text_down(number);
|
||||
|
||||
|
@ -238,7 +238,8 @@ string ThemeList()
|
||||
{
|
||||
usleep(100);
|
||||
|
||||
if(WPAD_ButtonsHeld(0) & (WPAD_BUTTON_UP | WPAD_CLASSIC_BUTTON_UP) || PAD_ButtonsDown(0) & PAD_BUTTON_UP)
|
||||
if(WPAD_ButtonsHeld(0) & (WPAD_BUTTON_UP | WPAD_CLASSIC_BUTTON_UP) || PAD_ButtonsDown(0) & PAD_BUTTON_UP
|
||||
|| WUPC_ButtonsHeld(0) & WPAD_CLASSIC_BUTTON_UP)
|
||||
{
|
||||
selection--;
|
||||
if(selection < 0)
|
||||
@ -258,7 +259,8 @@ string ThemeList()
|
||||
usleep(100000);
|
||||
}
|
||||
|
||||
if(WPAD_ButtonsHeld(0) & (WPAD_BUTTON_DOWN | WPAD_CLASSIC_BUTTON_DOWN) || PAD_ButtonsDown(0) & PAD_BUTTON_DOWN)
|
||||
if(WPAD_ButtonsHeld(0) & (WPAD_BUTTON_DOWN | WPAD_CLASSIC_BUTTON_DOWN) || PAD_ButtonsDown(0) & PAD_BUTTON_DOWN
|
||||
|| WUPC_ButtonsHeld(0) & WPAD_CLASSIC_BUTTON_DOWN)
|
||||
{
|
||||
selection++;
|
||||
if(selection == (signed)themes.size())
|
||||
@ -279,13 +281,15 @@ string ThemeList()
|
||||
usleep(100000);
|
||||
}
|
||||
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A) || PAD_ButtonsDown(0) & PAD_BUTTON_A)
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A) || PAD_ButtonsDown(0) & PAD_BUTTON_A
|
||||
|| WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_A)
|
||||
{
|
||||
downloadtheme = themes[selection + textScrollPos];
|
||||
stop = true;
|
||||
}
|
||||
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B) || PAD_ButtonsDown(0) & PAD_BUTTON_B)
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B) || PAD_ButtonsDown(0) & PAD_BUTTON_B
|
||||
|| WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_B)
|
||||
{
|
||||
downloadtheme = "NULL";
|
||||
stop = true;
|
||||
|
@ -281,7 +281,8 @@ string choiceRev(string revs)
|
||||
{
|
||||
usleep(100);
|
||||
|
||||
if(WPAD_ButtonsHeld(0) & (WPAD_BUTTON_UP | WPAD_CLASSIC_BUTTON_UP) || PAD_ButtonsDown(0) & PAD_BUTTON_UP)
|
||||
if(WPAD_ButtonsHeld(0) & (WPAD_BUTTON_UP | WPAD_CLASSIC_BUTTON_UP) || PAD_ButtonsDown(0) & PAD_BUTTON_UP
|
||||
|| WUPC_ButtonsHeld(0) & WPAD_CLASSIC_BUTTON_UP)
|
||||
{
|
||||
|
||||
selection--;
|
||||
@ -299,7 +300,8 @@ string choiceRev(string revs)
|
||||
usleep(100000);
|
||||
}
|
||||
|
||||
if(WPAD_ButtonsHeld(0) & (WPAD_BUTTON_DOWN | WPAD_CLASSIC_BUTTON_DOWN) || PAD_ButtonsDown(0) & PAD_BUTTON_DOWN)
|
||||
if(WPAD_ButtonsHeld(0) & (WPAD_BUTTON_DOWN | WPAD_CLASSIC_BUTTON_DOWN) || PAD_ButtonsDown(0) & PAD_BUTTON_DOWN
|
||||
|| WUPC_ButtonsHeld(0) & WPAD_CLASSIC_BUTTON_DOWN)
|
||||
{
|
||||
|
||||
selection++;
|
||||
@ -317,13 +319,15 @@ string choiceRev(string revs)
|
||||
usleep(100000);
|
||||
}
|
||||
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A) || PAD_ButtonsDown(0) & PAD_BUTTON_A)
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A) || PAD_ButtonsDown(0) & PAD_BUTTON_A
|
||||
|| WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_A)
|
||||
{
|
||||
rev = versions.line[selection + versions.textScrollPos];
|
||||
stop = true;
|
||||
}
|
||||
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B) || PAD_ButtonsDown(0) & PAD_BUTTON_B)
|
||||
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B) || PAD_ButtonsDown(0) & PAD_BUTTON_B
|
||||
|| WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_B)
|
||||
stop = true;
|
||||
}
|
||||
|
||||
|
@ -190,8 +190,10 @@ end:
|
||||
// Check if this is an IOS stub (according to WiiBrew.org)
|
||||
bool IsKnownStub(u32 noIOS, s32 noRevision)
|
||||
{
|
||||
if (noIOS == 0) return true;
|
||||
if (noIOS == 3 && noRevision == 65280) return true;
|
||||
if (noIOS == 4 && noRevision == 65280) return true;
|
||||
if (noIOS == 5 && noRevision == 65280) return true;
|
||||
if (noIOS == 10 && noRevision == 768) return true;
|
||||
if (noIOS == 11 && noRevision == 256) return true;
|
||||
if (noIOS == 16 && noRevision == 512) return true;
|
||||
@ -261,110 +263,106 @@ int previousIos()
|
||||
|
||||
bool listIOS()
|
||||
{
|
||||
if(ios_pos > 0)
|
||||
return true;
|
||||
|
||||
ioslist.clear();
|
||||
u32 nbTitles;
|
||||
if (ES_GetNumTitles(&nbTitles) < 0)
|
||||
return false;
|
||||
|
||||
// Allocate the memory for titles
|
||||
u64 *titles = (u64*)memalign(32, nbTitles*sizeof(u64));
|
||||
|
||||
if (titles == NULL)
|
||||
return false;
|
||||
|
||||
if (ES_GetTitles(titles, nbTitles) < 0)
|
||||
return false;
|
||||
|
||||
int i;
|
||||
u32 titleID;
|
||||
|
||||
// For each titles found
|
||||
for (i = 0; i < (signed)nbTitles; i++)
|
||||
if(ioslist.size() == 0)
|
||||
{
|
||||
// Skip non-system titles
|
||||
if (titles[i] >> 32 != 1) continue;
|
||||
|
||||
// Skip the system menu
|
||||
titleID = titles[i] & 0xFFFFFFFF;
|
||||
|
||||
if (titleID == 2) continue;
|
||||
|
||||
// Skip BC, MIOS and possible other non-IOS titles
|
||||
if (titleID > 0xFF) continue;
|
||||
|
||||
// Skip the running IOS
|
||||
if (titleID == 0) continue;
|
||||
|
||||
// Skip NAND-Emu IOS
|
||||
if (titleID == 253)
|
||||
{
|
||||
nandemu = 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
// Skip bootmii IOS
|
||||
if (titleID == 254)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// Check if this title is an IOS stub
|
||||
u32 tmdSize;
|
||||
tmd *iosTMD ATTRIBUTE_ALIGN(32);
|
||||
|
||||
// Get the stored TMD size for the title
|
||||
if (ES_GetStoredTMDSize(0x0000000100000000ULL | titleID, &tmdSize) < 0)
|
||||
u32 nbTitles;
|
||||
if (ES_GetNumTitles(&nbTitles) < 0)
|
||||
return false;
|
||||
|
||||
signed_blob *iosTMDBuffer = (signed_blob *)memalign(32, (tmdSize+32)&(~31));
|
||||
memset(iosTMDBuffer, 0, tmdSize);
|
||||
// Allocate the memory for titles
|
||||
u64 *titles = (u64*)memalign(32, nbTitles*sizeof(u64));
|
||||
|
||||
// Get the stored TMD for the title
|
||||
if (ES_GetStoredTMD(0x0000000100000000ULL | titleID, iosTMDBuffer, tmdSize) < 0)
|
||||
if (titles == NULL)
|
||||
return false;
|
||||
|
||||
iosTMD = (tmd *)SIGNATURE_PAYLOAD(iosTMDBuffer);
|
||||
if (ES_GetTitles(titles, nbTitles) < 0)
|
||||
return false;
|
||||
|
||||
free(iosTMDBuffer);
|
||||
int i;
|
||||
u32 titleID;
|
||||
|
||||
// Get the title version
|
||||
u8 noVersion = iosTMD->title_version;
|
||||
bool isStub = false;
|
||||
|
||||
// Check if this is an IOS stub (according to WiiBrew.org)
|
||||
if (IsKnownStub(titleID, iosTMD->title_version))
|
||||
isStub = true;
|
||||
else
|
||||
// For each titles found
|
||||
for (i = 0; i < (signed)nbTitles; i++)
|
||||
{
|
||||
// If the version is 00, it's probably a stub
|
||||
//
|
||||
// Stubs have these things in common:
|
||||
// - Title version is mostly 65280, or even better, the last 2 hexadecimal digits are 0;
|
||||
// - Stub have one app of their own (type 0x1) and 2 shared apps (type 0x8001).
|
||||
if (noVersion == 0)
|
||||
isStub = ((iosTMD->num_contents == 3) && (iosTMD->contents[0].type == 1 && iosTMD->contents[1].type == 0x8001 && iosTMD->contents[2].type == 0x8001));
|
||||
else
|
||||
isStub = false;
|
||||
}
|
||||
// Skip non-system titles
|
||||
if (titles[i] >> 32 != 1) continue;
|
||||
|
||||
xprintf("testing IOS: %d\n", titleID);
|
||||
// Skip the system menu
|
||||
titleID = titles[i] & 0xFFFFFFFF;
|
||||
|
||||
if(!isStub)
|
||||
{
|
||||
if(titleID == 254)
|
||||
{
|
||||
bootmii = 1;
|
||||
if (titleID == 2) continue;
|
||||
|
||||
// Skip BC, MIOS and possible other non-IOS titles
|
||||
if (titleID > 0xFF) continue;
|
||||
|
||||
// Skip the running IOS
|
||||
if (titleID == 0) continue;
|
||||
|
||||
// Skip NAND-Emu IOS
|
||||
if (titleID == 253)
|
||||
{
|
||||
nandemu = 1;
|
||||
continue;
|
||||
}
|
||||
xprintf("added IOS %d to list.\n", titleID);
|
||||
ioslist.push_back(titleID);
|
||||
}
|
||||
|
||||
// Check if this title is an IOS stub
|
||||
u32 tmdSize;
|
||||
tmd *iosTMD ATTRIBUTE_ALIGN(32);
|
||||
|
||||
// Get the stored TMD size for the title
|
||||
if (ES_GetStoredTMDSize(0x0000000100000000ULL | titleID, &tmdSize) < 0)
|
||||
return false;
|
||||
|
||||
signed_blob *iosTMDBuffer = (signed_blob *)memalign(32, (tmdSize+32)&(~31));
|
||||
memset(iosTMDBuffer, 0, tmdSize);
|
||||
|
||||
// Get the stored TMD for the title
|
||||
if (ES_GetStoredTMD(0x0000000100000000ULL | titleID, iosTMDBuffer, tmdSize) < 0)
|
||||
return false;
|
||||
|
||||
iosTMD = (tmd *)SIGNATURE_PAYLOAD(iosTMDBuffer);
|
||||
|
||||
free(iosTMDBuffer);
|
||||
|
||||
// Get the title version
|
||||
u8 noVersion = iosTMD->title_version;
|
||||
bool isStub = false;
|
||||
|
||||
// Check if this is an IOS stub (according to WiiBrew.org)
|
||||
if (IsKnownStub(titleID, iosTMD->title_version))
|
||||
isStub = true;
|
||||
else
|
||||
{
|
||||
// If the version is 00, it's probably a stub
|
||||
//
|
||||
// Stubs have these things in common:
|
||||
// - Title version is mostly 65280, or even better, the last 2 hexadecimal digits are 0;
|
||||
// - Stub have one app of their own (type 0x1) and 2 shared apps (type 0x8001).
|
||||
if (noVersion == 0)
|
||||
isStub = ((iosTMD->num_contents == 3) && (iosTMD->contents[0].type == 1 && iosTMD->contents[1].type == 0x8001 && iosTMD->contents[2].type == 0x8001));
|
||||
else
|
||||
isStub = false;
|
||||
}
|
||||
|
||||
xprintf("testing IOS: %d\n", titleID);
|
||||
|
||||
if(!isStub)
|
||||
{
|
||||
if (titleID == 254) {
|
||||
bootmii = 1;
|
||||
continue;
|
||||
}
|
||||
xprintf("added IOS %d to list.\n", titleID);
|
||||
ioslist.push_back(titleID);
|
||||
}
|
||||
|
||||
}
|
||||
std::sort( ioslist.begin(), ioslist.end() ); // sortieren
|
||||
return true;
|
||||
}
|
||||
std::sort( ioslist.begin(), ioslist.end() ); // sortieren
|
||||
return true;
|
||||
else
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
@ -425,8 +423,10 @@ int get_bootmii()
|
||||
if(Options.bootmii_boot2)
|
||||
return 3;
|
||||
else
|
||||
#endif
|
||||
return bootmii;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
void set_bootmii(int choice)
|
||||
|
@ -20,6 +20,8 @@
|
||||
#include <dirent.h>
|
||||
#include <di/di.h>
|
||||
|
||||
#include "../xprintf.h"
|
||||
|
||||
#include "fileop.h"
|
||||
#include "main.h"
|
||||
#include "Tools/app_list.h"
|
||||
@ -30,7 +32,9 @@
|
||||
|
||||
static const DISC_INTERFACE* sd = &__io_wiisd;
|
||||
static const DISC_INTERFACE* usb = &__io_usbstorage;
|
||||
#ifndef VWII
|
||||
static const DISC_INTERFACE* dvd = &__io_wiidvd;
|
||||
#endif
|
||||
|
||||
enum
|
||||
{
|
||||
@ -152,15 +156,6 @@ typedef struct _EXTENDED_BOOT_RECORD {
|
||||
u16 signature; /* EBR signature; 0xAA55 */
|
||||
} __attribute__((__packed__)) EXTENDED_BOOT_RECORD;
|
||||
|
||||
//#define DEBUG_MOUNTALL
|
||||
|
||||
#ifdef DEBUG_MOUNTALL
|
||||
#define debug_printf(fmt, args...) \
|
||||
fprintf(stderr, "%s:%d:" fmt, __FUNCTION__, __LINE__, ##args)
|
||||
#else
|
||||
#define debug_printf(fmt, args...)
|
||||
#endif
|
||||
|
||||
DEVICE_STRUCT part[2][MAX_DEVICES];
|
||||
|
||||
static void AddPartition(sec_t sector, int device, int type, int *devnum)
|
||||
@ -208,6 +203,7 @@ static void AddPartition(sec_t sector, int device, int type, int *devnum)
|
||||
else
|
||||
part[device][*devnum].name[0] = 0;
|
||||
}
|
||||
#ifndef VWII
|
||||
else if (type == T_ISO9660)
|
||||
{
|
||||
|
||||
@ -217,6 +213,7 @@ static void AddPartition(sec_t sector, int device, int type, int *devnum)
|
||||
strcpy(part[device][*devnum].name, "DVD");
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
strcpy(part[device][*devnum].mount, mount);
|
||||
part[device][*devnum].type = type;
|
||||
@ -268,11 +265,11 @@ static int FindPartitions(int device)
|
||||
}
|
||||
|
||||
// If this is the devices master boot record
|
||||
debug_printf("0x%x\n", sector.mbr.signature);
|
||||
xprintf("0x%x\n", sector.mbr.signature);
|
||||
if (sector.mbr.signature == MBR_SIGNATURE)
|
||||
{
|
||||
memcpy(&mbr, §or, sizeof(MASTER_BOOT_RECORD));
|
||||
debug_printf("Valid Master Boot Record found\n");
|
||||
xprintf("Valid Master Boot Record found\n");
|
||||
|
||||
// Search the partition table for all partitions (max. 4 primary partitions)
|
||||
for (i = 0; i < 4; i++)
|
||||
@ -280,7 +277,7 @@ static int FindPartitions(int device)
|
||||
partition = &mbr.partitions[i];
|
||||
part_lba = le32_to_cpu(mbr.partitions[i].lba_start);
|
||||
|
||||
debug_printf(
|
||||
xprintf(
|
||||
"Partition %i: %s, sector %u, type 0x%x\n",
|
||||
i + 1,
|
||||
partition->status == PARTITION_STATUS_BOOTABLE ? "bootable (active)"
|
||||
@ -292,21 +289,21 @@ static int FindPartitions(int device)
|
||||
// NTFS partition
|
||||
case PARTITION_TYPE_NTFS:
|
||||
{
|
||||
debug_printf("Partition %i: Claims to be NTFS\n", i + 1);
|
||||
xprintf("Partition %i: Claims to be NTFS\n", i + 1);
|
||||
|
||||
// Read and validate the NTFS partition
|
||||
if (interface->readSectors(part_lba, 1, §or))
|
||||
{
|
||||
debug_printf("sector.boot.oem_id: 0x%x\n", sector.boot.oem_id);
|
||||
debug_printf("NTFS_OEM_ID: 0x%x\n", NTFS_OEM_ID);
|
||||
xprintf("sector.boot.oem_id: 0x%x\n", sector.boot.oem_id);
|
||||
xprintf("NTFS_OEM_ID: 0x%x\n", NTFS_OEM_ID);
|
||||
if (sector.boot.oem_id == NTFS_OEM_ID)
|
||||
{
|
||||
debug_printf("Partition %i: Valid NTFS boot sector found\n", i + 1);
|
||||
xprintf("Partition %i: Valid NTFS boot sector found\n", i + 1);
|
||||
AddPartition(part_lba, device, T_NTFS, &devnum);
|
||||
}
|
||||
else
|
||||
{
|
||||
debug_printf("Partition %i: Invalid NTFS boot sector, not actually NTFS\n", i + 1);
|
||||
xprintf("Partition %i: Invalid NTFS boot sector, not actually NTFS\n", i + 1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -316,7 +313,7 @@ static int FindPartitions(int device)
|
||||
case PARTITION_TYPE_DOS33_EXTENDED:
|
||||
case PARTITION_TYPE_WIN95_EXTENDED:
|
||||
{
|
||||
debug_printf("Partition %i: Claims to be Extended\n", i + 1);
|
||||
xprintf("Partition %i: Claims to be Extended\n", i + 1);
|
||||
|
||||
// Walk the extended partition chain, finding all NTFS partitions within it
|
||||
sec_t ebr_lba = part_lba;
|
||||
@ -328,7 +325,7 @@ static int FindPartitions(int device)
|
||||
{
|
||||
if (sector.ebr.signature == EBR_SIGNATURE)
|
||||
{
|
||||
debug_printf(
|
||||
xprintf(
|
||||
"Logical Partition @ %d: %s type 0x%x\n",
|
||||
ebr_lba + next_erb_lba,
|
||||
sector.ebr.partition.status
|
||||
@ -346,7 +343,7 @@ static int FindPartitions(int device)
|
||||
|
||||
if(sector.ebr.partition.type==PARTITION_TYPE_LINUX)
|
||||
{
|
||||
debug_printf("Partition : type EXT2/3/4 found\n");
|
||||
xprintf("Partition : type EXT2/3/4 found\n");
|
||||
AddPartition(part_lba, device, T_EXT2, &devnum);
|
||||
}
|
||||
// Check if this partition has a valid NTFS boot record
|
||||
@ -354,13 +351,13 @@ static int FindPartitions(int device)
|
||||
{
|
||||
if (sector.boot.oem_id == NTFS_OEM_ID)
|
||||
{
|
||||
debug_printf(
|
||||
xprintf(
|
||||
"Logical Partition @ %d: Valid NTFS boot sector found\n",
|
||||
part_lba);
|
||||
if (sector.ebr.partition.type
|
||||
!= PARTITION_TYPE_NTFS)
|
||||
{
|
||||
debug_printf(
|
||||
xprintf(
|
||||
"Logical Partition @ %d: Is NTFS but type is 0x%x; 0x%x was expected\n",
|
||||
part_lba,
|
||||
sector.ebr.partition.type,
|
||||
@ -375,7 +372,7 @@ static int FindPartitions(int device)
|
||||
+ BPB_FAT32_fileSysType,
|
||||
FAT_SIG, sizeof(FAT_SIG)))
|
||||
{
|
||||
debug_printf("Partition : Valid FAT boot sector found\n");
|
||||
xprintf("Partition : Valid FAT boot sector found\n");
|
||||
AddPartition(part_lba, device, T_FAT, &devnum);
|
||||
}
|
||||
}
|
||||
@ -391,7 +388,7 @@ static int FindPartitions(int device)
|
||||
|
||||
case PARTITION_TYPE_LINUX:
|
||||
{
|
||||
debug_printf("Partition %i: Claims to be LINUX\n", i + 1);
|
||||
xprintf("Partition %i: Claims to be LINUX\n", i + 1);
|
||||
|
||||
// Read and validate the EXT2 partition
|
||||
AddPartition(part_lba, device, T_EXT2, &devnum);
|
||||
@ -400,7 +397,7 @@ static int FindPartitions(int device)
|
||||
|
||||
// Ignore empty partitions
|
||||
case PARTITION_TYPE_EMPTY:
|
||||
debug_printf("Partition %i: Claims to be empty\n", i + 1);
|
||||
xprintf("Partition %i: Claims to be empty\n", i + 1);
|
||||
// Unknown or unsupported partition type
|
||||
default:
|
||||
{
|
||||
@ -410,10 +407,10 @@ static int FindPartitions(int device)
|
||||
{
|
||||
if (sector.boot.oem_id == NTFS_OEM_ID)
|
||||
{
|
||||
debug_printf("Partition %i: Valid NTFS boot sector found\n",i + 1);
|
||||
xprintf("Partition %i: Valid NTFS boot sector found\n",i + 1);
|
||||
if (partition->type != PARTITION_TYPE_NTFS)
|
||||
{
|
||||
debug_printf(
|
||||
xprintf(
|
||||
"Partition %i: Is NTFS but type is 0x%x; 0x%x was expected\n",
|
||||
i + 1, partition->type,
|
||||
PARTITION_TYPE_NTFS);
|
||||
@ -425,12 +422,12 @@ static int FindPartitions(int device)
|
||||
sector.buffer + BPB_FAT32_fileSysType, FAT_SIG,
|
||||
sizeof(FAT_SIG)))
|
||||
{
|
||||
debug_printf("Partition : Valid FAT boot sector found\n");
|
||||
xprintf("Partition : Valid FAT boot sector found\n");
|
||||
AddPartition(part_lba, device, T_FAT, &devnum);
|
||||
}
|
||||
else
|
||||
{
|
||||
debug_printf("Trying : EXT partition\n");
|
||||
xprintf("Trying : EXT partition\n");
|
||||
AddPartition(part_lba, device, T_EXT2, &devnum);
|
||||
}
|
||||
}
|
||||
@ -441,7 +438,7 @@ static int FindPartitions(int device)
|
||||
}
|
||||
if(devnum==0) // it is assumed this device has no master boot record or no partitions found
|
||||
{
|
||||
debug_printf("No Master Boot Record was found or no partitions found!\n");
|
||||
xprintf("No Master Boot Record was found or no partitions found!\n");
|
||||
|
||||
// As a last-ditched effort, search the first 64 sectors of the device for stray NTFS/FAT partitions
|
||||
for (i = 0; i < 64; i++)
|
||||
@ -450,7 +447,7 @@ static int FindPartitions(int device)
|
||||
{
|
||||
if (sector.boot.oem_id == NTFS_OEM_ID)
|
||||
{
|
||||
debug_printf("Valid NTFS boot sector found at sector %d!\n", i);
|
||||
xprintf("Valid NTFS boot sector found at sector %d!\n", i);
|
||||
AddPartition(i, device, T_NTFS, &devnum);
|
||||
break;
|
||||
}
|
||||
@ -458,13 +455,13 @@ static int FindPartitions(int device)
|
||||
sizeof(FAT_SIG)) || !memcmp(sector.buffer
|
||||
+ BPB_FAT32_fileSysType, FAT_SIG, sizeof(FAT_SIG)))
|
||||
{
|
||||
debug_printf("Partition : Valid FAT boot sector found\n");
|
||||
xprintf("Partition : Valid FAT boot sector found\n");
|
||||
AddPartition(i, device, T_FAT, &devnum);
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
debug_printf("Trying : EXT partition\n");
|
||||
xprintf("Trying : EXT partition\n");
|
||||
AddPartition(part_lba, device, T_EXT2, &devnum);
|
||||
}
|
||||
}
|
||||
@ -498,12 +495,14 @@ static void UnmountPartitions(int device)
|
||||
ext2Unmount(part[device][i].mount);
|
||||
break;
|
||||
}
|
||||
#ifdef VWII
|
||||
else if(part[device][i].type == T_ISO9660)
|
||||
{
|
||||
sprintf(mount, "ISO9660: %s:", part[device][i].mount);
|
||||
UnMountDVD();
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
part[device][i].name[0] = 0;
|
||||
part[device][i].mount[0] = 0;
|
||||
@ -533,7 +532,6 @@ static bool MountPartitions(int device)
|
||||
case DEVICE_USB:
|
||||
disc = usb;
|
||||
break;
|
||||
break;
|
||||
default:
|
||||
return false; // unknown device
|
||||
}
|
||||
@ -631,11 +629,14 @@ void UnmountAllDevices()
|
||||
{
|
||||
UnmountPartitions(DEVICE_SD);
|
||||
UnmountPartitions(DEVICE_USB);
|
||||
#ifndef VWII
|
||||
UnMountDVD();
|
||||
fatUnmount("gca:");
|
||||
fatUnmount("gcb:");
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef VWII
|
||||
bool GCA_Inserted()
|
||||
{
|
||||
|
||||
@ -688,6 +689,7 @@ void check_gcb()
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
bool SDCard_Inserted()
|
||||
{
|
||||
@ -740,6 +742,7 @@ void check_usb()
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef VWII
|
||||
void check_dvd()
|
||||
{
|
||||
if(Settings.dvd_insert <= 0)
|
||||
@ -760,6 +763,7 @@ void check_dvd()
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void check_device()
|
||||
{
|
||||
|
@ -1,3 +1,6 @@
|
||||
#ifndef VWII
|
||||
#ifndef NO_DEBUG
|
||||
|
||||
#include <gccore.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
@ -8,8 +11,6 @@
|
||||
/* init-globals */
|
||||
static bool geckoinit = false;
|
||||
|
||||
#ifndef VWII
|
||||
#ifndef NO_DEBUG
|
||||
#include <stdarg.h>
|
||||
|
||||
void gprintf(const char *format, ...)
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include <ogcsys.h>
|
||||
#include <unistd.h>
|
||||
#include <wiiuse/wpad.h>
|
||||
#include <wupc/wupc.h>
|
||||
|
||||
#include "menu.h"
|
||||
#include "video.h"
|
||||
@ -31,11 +32,14 @@ static int rumbleCount[4] = {0,0,0,0};
|
||||
***************************************************************************/
|
||||
void UpdatePads()
|
||||
{
|
||||
WUPC_UpdateButtonStats();
|
||||
WPAD_ScanPads();
|
||||
PAD_ScanPads();
|
||||
|
||||
for(int i=/*3*/ 0; i >= 0; i--)
|
||||
for(int i=0; i < 4; i++)
|
||||
{
|
||||
userInput[i].wpad = WPAD_Data(i);
|
||||
userInput[i].chan = i;
|
||||
userInput[i].pad.btns_d = PAD_ButtonsDown(i);
|
||||
userInput[i].pad.btns_u = PAD_ButtonsUp(i);
|
||||
userInput[i].pad.btns_h = PAD_ButtonsHeld(i);
|
||||
@ -45,6 +49,19 @@ void UpdatePads()
|
||||
userInput[i].pad.substickY = PAD_SubStickY(i);
|
||||
userInput[i].pad.triggerL = PAD_TriggerL(i);
|
||||
userInput[i].pad.triggerR = PAD_TriggerR(i);
|
||||
|
||||
// WiiU Pro Controller
|
||||
userInput[i].wupcdata.btns_d = WUPC_ButtonsDown(i);
|
||||
userInput[i].wupcdata.btns_u = WUPC_ButtonsUp(i);
|
||||
userInput[i].wupcdata.btns_h = WUPC_ButtonsHeld(i);
|
||||
userInput[i].wupcdata.stickX = WUPC_lStickX(i);
|
||||
userInput[i].wupcdata.stickY = WUPC_lStickY(i);
|
||||
userInput[i].wupcdata.substickX = WUPC_rStickX(i);
|
||||
userInput[i].wupcdata.substickY = WUPC_rStickY(i);
|
||||
// Don't use only held to disconnect, on reconnect the pad sends last held state for a short time.
|
||||
if((WUPC_ButtonsHeld(i) & WUPC_EXTRA_BUTTON_RSTICK && WUPC_ButtonsDown(i) & WUPC_EXTRA_BUTTON_LSTICK) // R3+L3
|
||||
||(WUPC_ButtonsHeld(i) & WUPC_EXTRA_BUTTON_LSTICK && WUPC_ButtonsDown(i) & WUPC_EXTRA_BUTTON_RSTICK))
|
||||
WUPC_Disconnect(i);
|
||||
}
|
||||
}
|
||||
|
||||
@ -56,16 +73,16 @@ void UpdatePads()
|
||||
void SetupPads()
|
||||
{
|
||||
PAD_Init();
|
||||
WUPC_Init();
|
||||
WPAD_Init();
|
||||
|
||||
// read wiimote accelerometer and IR data
|
||||
WPAD_SetDataFormat(WPAD_CHAN_ALL,WPAD_FMT_BTNS_ACC_IR);
|
||||
WPAD_SetVRes(WPAD_CHAN_ALL, screenwidth, screenheight);
|
||||
|
||||
for(int i=0; i < /*4*/ 1; i++)
|
||||
for(int i=0; i < 4; i++)
|
||||
{
|
||||
userInput[i].chan = i;
|
||||
userInput[i].wpad = WPAD_Data(i);
|
||||
}
|
||||
}
|
||||
|
||||
@ -75,8 +92,9 @@ void SetupPads()
|
||||
|
||||
void ShutoffRumble()
|
||||
{
|
||||
for(int i=0;i</*4*/ 1;i++)
|
||||
for(int i=0;i< 4;i++)
|
||||
{
|
||||
WUPC_Rumble(i, 0);
|
||||
WPAD_Rumble(i, 0);
|
||||
rumbleCount[i] = 0;
|
||||
}
|
||||
@ -90,6 +108,8 @@ void ShutdownPads()
|
||||
{
|
||||
ShutoffRumble();
|
||||
WPAD_Flush(0);
|
||||
WUPC_Disconnect(0);
|
||||
WUPC_Shutdown();
|
||||
WPAD_Disconnect(0);
|
||||
WPAD_Shutdown();
|
||||
}
|
||||
@ -102,6 +122,7 @@ void DoRumble(int i)
|
||||
{
|
||||
if(rumbleRequest[i] && rumbleCount[i] < 3)
|
||||
{
|
||||
WUPC_Rumble(i, 1);
|
||||
WPAD_Rumble(i, 1); // rumble on
|
||||
rumbleCount[i]++;
|
||||
}
|
||||
@ -115,6 +136,7 @@ void DoRumble(int i)
|
||||
if(rumbleCount[i])
|
||||
rumbleCount[i]--;
|
||||
WPAD_Rumble(i, 0); // rumble off
|
||||
WUPC_Rumble(i, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -12,8 +12,9 @@
|
||||
#include <gccore.h>
|
||||
#include <wiiuse/wpad.h>
|
||||
|
||||
#define PI 3.14159265f
|
||||
#define PI 3.14159265f
|
||||
#define PADCAL 50
|
||||
#define WUPCCAL 400
|
||||
|
||||
extern int rumbleRequest[4];
|
||||
|
||||
|
@ -41,6 +41,7 @@
|
||||
#include <math.h>
|
||||
#include <asndlib.h>
|
||||
#include <wiiuse/wpad.h>
|
||||
#include <wupc/wupc.h>
|
||||
#include "pngu.h"
|
||||
#include "FreeTypeGX.h"
|
||||
#include "video.h"
|
||||
@ -117,6 +118,16 @@ typedef struct _paddata {
|
||||
u8 triggerR;
|
||||
} PADData;
|
||||
|
||||
typedef struct _wupcfulldata {
|
||||
u32 btns_d;
|
||||
u32 btns_u;
|
||||
u32 btns_h;
|
||||
s16 stickX;
|
||||
s16 stickY;
|
||||
s16 substickX;
|
||||
s16 substickY;
|
||||
} WUPCFullData;
|
||||
|
||||
typedef struct _POINT {
|
||||
s32 x;
|
||||
s32 y;
|
||||
@ -183,6 +194,8 @@ class GuiTrigger
|
||||
s32 chan; //!< Trigger controller channel (0-3, -1 for all)
|
||||
WPADData * wpad; //!< Wii controller trigger
|
||||
WPADData wpaddata; //!< Wii controller trigger data
|
||||
WUPCFullData * wupad; //!< WiiU Pro controller trigger
|
||||
WUPCFullData wupcdata; //!< WiiU Pro controller trigger data
|
||||
PADData pad; //!< GameCube controller trigger data
|
||||
};
|
||||
|
||||
|
@ -185,13 +185,13 @@ void GuiButton::Update(GuiTrigger * t)
|
||||
}
|
||||
#endif
|
||||
|
||||
// button triggers
|
||||
if(this->IsClickable())
|
||||
// button triggers
|
||||
if (this->IsClickable())
|
||||
{
|
||||
s32 wm_btns, wm_btns_trig, cc_btns, cc_btns_trig;
|
||||
s32 wm_btns, wm_btns_trig, cc_btns, cc_btns_trig, wupc_btns, wupc_btns_trig;
|
||||
for(int i=0; i<2; i++)
|
||||
{
|
||||
if(trigger[i] && (trigger[i]->chan == -1 || trigger[i]->chan == t->chan))
|
||||
if (trigger[i] && (trigger[i]->chan == -1 || trigger[i]->chan == t->chan))
|
||||
{
|
||||
// higher 16 bits only (wiimote)
|
||||
wm_btns = t->wpad->btns_d << 16;
|
||||
@ -201,20 +201,22 @@ void GuiButton::Update(GuiTrigger * t)
|
||||
cc_btns = t->wpad->btns_d >> 16;
|
||||
cc_btns_trig = trigger[i]->wpad->btns_d >> 16;
|
||||
|
||||
if(
|
||||
(t->wpad->btns_d > 0 &&
|
||||
(wm_btns == wm_btns_trig ||
|
||||
(cc_btns == cc_btns_trig && t->wpad->exp.type == EXP_CLASSIC))) ||
|
||||
(t->pad.btns_d == trigger[i]->pad.btns_d && t->pad.btns_d > 0))
|
||||
// lower 16 bits only (WiiU Pro controller)
|
||||
wupc_btns = t->wupcdata.btns_d >> 16;
|
||||
wupc_btns_trig = trigger[i]->wupcdata.btns_d >> 16;
|
||||
|
||||
if( ((t->wpad->btns_d > 0 && wm_btns == wm_btns_trig)
|
||||
|| (t->wpad->exp.type == WPAD_EXP_CLASSIC && cc_btns == cc_btns_trig))
|
||||
|| (t->pad.btns_d > 0 && t->pad.btns_d == trigger[i]->pad.btns_d)
|
||||
|| (t->wupcdata.btns_d > 0 && wupc_btns == wupc_btns_trig))
|
||||
{
|
||||
if(t->chan == stateChan || stateChan == -1)
|
||||
if (t->chan == stateChan || stateChan == -1)
|
||||
{
|
||||
if(state == STATE_SELECTED)
|
||||
{
|
||||
if(!t->wpad->ir.valid || this->IsInside(t->wpad->ir.x, t->wpad->ir.y))
|
||||
if(!t->wpad->ir.valid || this->IsInside(t->wpad->ir.x, t->wpad->ir.y))
|
||||
{
|
||||
this->SetState(STATE_CLICKED, t->chan);
|
||||
|
||||
}
|
||||
}
|
||||
else if(trigger[i]->type == TRIGGER_BUTTON_ONLY)
|
||||
@ -222,7 +224,7 @@ void GuiButton::Update(GuiTrigger * t)
|
||||
this->SetState(STATE_CLICKED, t->chan);
|
||||
}
|
||||
else if(trigger[i]->type == TRIGGER_BUTTON_ONLY_IN_FOCUS &&
|
||||
parentElement->IsFocused())
|
||||
parentElement->IsFocused())
|
||||
{
|
||||
this->SetState(STATE_CLICKED, t->chan);
|
||||
}
|
||||
@ -232,14 +234,14 @@ void GuiButton::Update(GuiTrigger * t)
|
||||
}
|
||||
}
|
||||
|
||||
if(this->IsHoldable())
|
||||
if (this->IsHoldable())
|
||||
{
|
||||
bool held = false;
|
||||
s32 wm_btns, wm_btns_h, wm_btns_trig, cc_btns, cc_btns_h, cc_btns_trig;
|
||||
s32 wm_btns, wm_btns_h, wm_btns_trig, cc_btns, cc_btns_h, cc_btns_trig, wupc_btns, wupc_btns_h, wupc_btns_trig;
|
||||
|
||||
for(int i=0; i<2; i++)
|
||||
{
|
||||
if(trigger[i] && (trigger[i]->chan == -1 || trigger[i]->chan == t->chan))
|
||||
if (trigger[i] && (trigger[i]->chan == -1 || trigger[i]->chan == t->chan))
|
||||
{
|
||||
// higher 16 bits only (wiimote)
|
||||
wm_btns = t->wpad->btns_d << 16;
|
||||
@ -251,35 +253,40 @@ void GuiButton::Update(GuiTrigger * t)
|
||||
cc_btns_h = t->wpad->btns_h >> 16;
|
||||
cc_btns_trig = trigger[i]->wpad->btns_h >> 16;
|
||||
|
||||
if(
|
||||
(t->wpad->btns_d > 0 &&
|
||||
(wm_btns == wm_btns_trig ||
|
||||
(cc_btns == cc_btns_trig && t->wpad->exp.type == EXP_CLASSIC))) ||
|
||||
(t->pad.btns_d == trigger[i]->pad.btns_h && t->pad.btns_d > 0))
|
||||
// lower 16 bits only (WiiU Pro controller)
|
||||
wupc_btns = t->wupcdata.btns_d >> 16;
|
||||
wupc_btns_h = t->wupcdata.btns_h >> 16;
|
||||
wupc_btns_trig = trigger[i]->wupcdata.btns_h >> 16;
|
||||
|
||||
if( (t->wpad->btns_d > 0 && wm_btns == wm_btns_trig)
|
||||
|| (t->wpad->exp.type == WPAD_EXP_CLASSIC && cc_btns == cc_btns_trig)
|
||||
|| (t->pad.btns_d > 0 && t->pad.btns_d == trigger[i]->pad.btns_d)
|
||||
|| (t->wupcdata.btns_d > 0 && wupc_btns == wupc_btns_trig))
|
||||
{
|
||||
if(trigger[i]->type == TRIGGER_HELD && state == STATE_SELECTED &&
|
||||
if (trigger[i]->type == TRIGGER_HELD && state == STATE_SELECTED &&
|
||||
(t->chan == stateChan || stateChan == -1))
|
||||
this->SetState(STATE_CLICKED, t->chan);
|
||||
}
|
||||
|
||||
if(
|
||||
(t->wpad->btns_h > 0 &&
|
||||
(wm_btns_h == wm_btns_trig ||
|
||||
(cc_btns_h == cc_btns_trig && t->wpad->exp.type == EXP_CLASSIC))) ||
|
||||
(t->pad.btns_h == trigger[i]->pad.btns_h && t->pad.btns_h > 0))
|
||||
if( (t->wpad->btns_h > 0 && wm_btns_h == wm_btns_trig)
|
||||
|| (t->wpad->exp.type == WPAD_EXP_CLASSIC && cc_btns_h == cc_btns_trig)
|
||||
|| (t->pad.btns_h > 0 && t->pad.btns_h == trigger[i]->pad.btns_h)
|
||||
|| (t->wupcdata.btns_h > 0 && wupc_btns_h == wupc_btns_trig)
|
||||
)
|
||||
{
|
||||
if(trigger[i]->type == TRIGGER_HELD)
|
||||
if (trigger[i]->type == TRIGGER_HELD)
|
||||
held = true;
|
||||
}
|
||||
|
||||
if(!held && state == STATE_HELD && stateChan == t->chan)
|
||||
if (!held && state == STATE_HELD && stateChan == t->chan)
|
||||
{
|
||||
this->ResetState();
|
||||
}
|
||||
else if(held && state == STATE_CLICKED && stateChan == t->chan)
|
||||
else if (held && state == STATE_CLICKED && stateChan == t->chan)
|
||||
{
|
||||
this->SetState(STATE_HELD, t->chan);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -18,9 +18,11 @@ static int scrollDelay = 0;
|
||||
GuiTrigger::GuiTrigger()
|
||||
{
|
||||
chan = -1;
|
||||
memset(&wupcdata, 0, sizeof(WUPCFullData));
|
||||
memset(&wpaddata, 0, sizeof(WPADData));
|
||||
memset(&pad, 0, sizeof(PADData));
|
||||
wpad = &wpaddata;
|
||||
wupad = &wupcdata;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -39,6 +41,7 @@ void GuiTrigger::SetSimpleTrigger(s32 ch, u32 wiibtns, u16 gcbtns)
|
||||
{
|
||||
type = TRIGGER_SIMPLE;
|
||||
chan = ch;
|
||||
wupcdata.btns_d = wiibtns;
|
||||
wpaddata.btns_d = wiibtns;
|
||||
pad.btns_d = gcbtns;
|
||||
}
|
||||
@ -52,6 +55,7 @@ void GuiTrigger::SetHeldTrigger(s32 ch, u32 wiibtns, u16 gcbtns)
|
||||
{
|
||||
type = TRIGGER_HELD;
|
||||
chan = ch;
|
||||
wupcdata.btns_h = wiibtns;
|
||||
wpaddata.btns_h = wiibtns;
|
||||
pad.btns_h = gcbtns;
|
||||
}
|
||||
@ -63,6 +67,8 @@ void GuiTrigger::SetButtonOnlyHeldTrigger(s32 ch, u32 wiibtns, u16 gcbtns)
|
||||
{
|
||||
type = TRIGGER_BUTTON_ONLY_HELD;
|
||||
chan = ch;
|
||||
wupcdata.btns_d = wiibtns;
|
||||
wupcdata.btns_h = wiibtns;
|
||||
wpaddata.btns_d = wiibtns;
|
||||
wpaddata.btns_h = wiibtns;
|
||||
pad.btns_d = gcbtns;
|
||||
@ -77,6 +83,7 @@ void GuiTrigger::SetButtonOnlyTrigger(s32 ch, u32 wiibtns, u16 gcbtns)
|
||||
{
|
||||
type = TRIGGER_BUTTON_ONLY;
|
||||
chan = ch;
|
||||
wupcdata.btns_d = wiibtns;
|
||||
wpaddata.btns_d = wiibtns;
|
||||
pad.btns_d = gcbtns;
|
||||
}
|
||||
@ -90,6 +97,7 @@ void GuiTrigger::SetButtonOnlyInFocusTrigger(s32 ch, u32 wiibtns, u16 gcbtns)
|
||||
{
|
||||
type = TRIGGER_BUTTON_ONLY_IN_FOCUS;
|
||||
chan = ch;
|
||||
wupcdata.btns_d = wiibtns;
|
||||
wpaddata.btns_d = wiibtns;
|
||||
pad.btns_d = gcbtns;
|
||||
}
|
||||
@ -149,28 +157,25 @@ s8 GuiTrigger::WPAD_Stick(u8 right, int axis)
|
||||
bool GuiTrigger::Left()
|
||||
{
|
||||
u32 wiibtn = WPAD_BUTTON_LEFT;
|
||||
if(wpad->exp.type == WPAD_EXP_CLASSIC || (wupcdata.btns_d | wupcdata.btns_h) > 0)
|
||||
wiibtn |= WPAD_CLASSIC_BUTTON_LEFT;
|
||||
|
||||
if((wpad->btns_d | wpad->btns_h) & (wiibtn | WPAD_CLASSIC_BUTTON_LEFT)
|
||||
|| (pad.btns_d | pad.btns_h) & PAD_BUTTON_LEFT
|
||||
|| pad.stickX < -PADCAL
|
||||
|| WPAD_Stick(0,0) < -PADCAL)
|
||||
if( ((wpad->btns_d | wpad->btns_h) & wiibtn)
|
||||
|| ((wupcdata.btns_d | wupcdata.btns_h) & wiibtn)
|
||||
|| ((pad.btns_d | pad.btns_h) & PAD_BUTTON_LEFT))
|
||||
{
|
||||
if(wpad->btns_d & (wiibtn | WPAD_CLASSIC_BUTTON_LEFT)
|
||||
|| pad.btns_d & PAD_BUTTON_LEFT)
|
||||
if( (wpad->btns_d & wiibtn)
|
||||
|| (wupcdata.btns_d & wiibtn)
|
||||
|| (pad.btns_d & PAD_BUTTON_LEFT))
|
||||
{
|
||||
scrollDelay = SCROLL_INITIAL_DELAY; // reset scroll delay.
|
||||
return true;
|
||||
}
|
||||
else if(scrollDelay == 0)
|
||||
else if (--scrollDelay <= 0)
|
||||
{
|
||||
scrollDelay = SCROLL_LOOP_DELAY;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(scrollDelay > 0)
|
||||
scrollDelay--;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@ -178,28 +183,25 @@ bool GuiTrigger::Left()
|
||||
bool GuiTrigger::Right()
|
||||
{
|
||||
u32 wiibtn = WPAD_BUTTON_RIGHT;
|
||||
if(wpad->exp.type == WPAD_EXP_CLASSIC || (wupcdata.btns_d | wupcdata.btns_h))
|
||||
wiibtn |= WPAD_CLASSIC_BUTTON_RIGHT;
|
||||
|
||||
if((wpad->btns_d | wpad->btns_h) & (wiibtn | WPAD_CLASSIC_BUTTON_RIGHT)
|
||||
|| (pad.btns_d | pad.btns_h) & PAD_BUTTON_RIGHT
|
||||
|| pad.stickX > PADCAL
|
||||
|| WPAD_Stick(0,0) > PADCAL)
|
||||
if( ((wpad->btns_d | wpad->btns_h) & wiibtn)
|
||||
|| ((pad.btns_d | pad.btns_h) & PAD_BUTTON_RIGHT)
|
||||
|| ((wupcdata.btns_d | wupcdata.btns_h) & wiibtn))
|
||||
{
|
||||
if(wpad->btns_d & (wiibtn | WPAD_CLASSIC_BUTTON_RIGHT)
|
||||
|| pad.btns_d & PAD_BUTTON_RIGHT)
|
||||
if( (wpad->btns_d & wiibtn)
|
||||
|| (pad.btns_d & PAD_BUTTON_RIGHT)
|
||||
|| (wupcdata.btns_d & wiibtn))
|
||||
{
|
||||
scrollDelay = SCROLL_INITIAL_DELAY; // reset scroll delay.
|
||||
return true;
|
||||
}
|
||||
else if(scrollDelay == 0)
|
||||
else if (--scrollDelay <= 0)
|
||||
{
|
||||
scrollDelay = SCROLL_LOOP_DELAY;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(scrollDelay > 0)
|
||||
scrollDelay--;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@ -207,28 +209,25 @@ bool GuiTrigger::Right()
|
||||
bool GuiTrigger::Up()
|
||||
{
|
||||
u32 wiibtn = WPAD_BUTTON_UP;
|
||||
if(wpad->exp.type == WPAD_EXP_CLASSIC || (wupcdata.btns_d | wupcdata.btns_h))
|
||||
wiibtn |= WPAD_CLASSIC_BUTTON_UP;
|
||||
|
||||
if((wpad->btns_d | wpad->btns_h) & (wiibtn | WPAD_CLASSIC_BUTTON_UP)
|
||||
|| (pad.btns_d | pad.btns_h) & PAD_BUTTON_UP
|
||||
|| pad.stickY > PADCAL
|
||||
|| WPAD_Stick(0,1) > PADCAL)
|
||||
if( ((wpad->btns_d | wpad->btns_h) & wiibtn)
|
||||
|| ((pad.btns_d | pad.btns_h) & PAD_BUTTON_UP)
|
||||
|| ((wupcdata.btns_d | wupcdata.btns_h) & wiibtn))
|
||||
{
|
||||
if(wpad->btns_d & (wiibtn | WPAD_CLASSIC_BUTTON_UP)
|
||||
|| pad.btns_d & PAD_BUTTON_UP)
|
||||
if( (wpad->btns_d & wiibtn)
|
||||
|| (wupcdata.btns_d & wiibtn)
|
||||
|| (pad.btns_d & PAD_BUTTON_UP))
|
||||
{
|
||||
scrollDelay = SCROLL_INITIAL_DELAY; // reset scroll delay.
|
||||
return true;
|
||||
}
|
||||
else if(scrollDelay == 0)
|
||||
else if (--scrollDelay <= 0)
|
||||
{
|
||||
scrollDelay = SCROLL_LOOP_DELAY;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(scrollDelay > 0)
|
||||
scrollDelay--;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@ -236,28 +235,25 @@ bool GuiTrigger::Up()
|
||||
bool GuiTrigger::Down()
|
||||
{
|
||||
u32 wiibtn = WPAD_BUTTON_DOWN;
|
||||
if(wpad->exp.type == WPAD_EXP_CLASSIC || (wupcdata.btns_d | wupcdata.btns_h))
|
||||
wiibtn |= WPAD_CLASSIC_BUTTON_DOWN;
|
||||
|
||||
if((wpad->btns_d | wpad->btns_h) & (wiibtn | WPAD_CLASSIC_BUTTON_DOWN)
|
||||
|| (pad.btns_d | pad.btns_h) & PAD_BUTTON_DOWN
|
||||
|| pad.stickY < -PADCAL
|
||||
|| WPAD_Stick(0,1) < -PADCAL)
|
||||
if( ((wpad->btns_d | wpad->btns_h) & wiibtn)
|
||||
|| ((pad.btns_d | pad.btns_h) & PAD_BUTTON_DOWN)
|
||||
|| ((wupcdata.btns_d | wupcdata.btns_h) & wiibtn))
|
||||
{
|
||||
if(wpad->btns_d & (wiibtn | WPAD_CLASSIC_BUTTON_DOWN)
|
||||
|| pad.btns_d & PAD_BUTTON_DOWN)
|
||||
if( (wpad->btns_d & wiibtn)
|
||||
|| (pad.btns_d & PAD_BUTTON_DOWN)
|
||||
|| (wupcdata.btns_d & wiibtn))
|
||||
{
|
||||
scrollDelay = SCROLL_INITIAL_DELAY; // reset scroll delay.
|
||||
return true;
|
||||
}
|
||||
else if(scrollDelay == 0)
|
||||
else if (--scrollDelay <= 0)
|
||||
{
|
||||
scrollDelay = SCROLL_LOOP_DELAY;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(scrollDelay > 0)
|
||||
scrollDelay--;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ void addAppIos(string foldername, int ios)
|
||||
}
|
||||
if(found)
|
||||
appios[i].ios = ios;
|
||||
if(!found)
|
||||
else
|
||||
appios.push_back(app_ios(foldername, ios));
|
||||
}
|
||||
}
|
||||
@ -106,7 +106,9 @@ void ExitApp()
|
||||
save();
|
||||
xprintf("Unmount Devices and NAND\n");
|
||||
UnmountAllDevices();
|
||||
#ifndef VWII
|
||||
exit_uneek_fs();
|
||||
#endif
|
||||
ISFS_Deinitialize();
|
||||
}
|
||||
|
||||
@ -177,7 +179,7 @@ DefaultOptions()
|
||||
Options.apps = 4;
|
||||
Options.quick_start = 0;
|
||||
Options.show_all = 1;
|
||||
Options.sdgecko = 1;
|
||||
Options.sdgecko = 0;
|
||||
#ifndef VWII
|
||||
Options.bootmii_boot2 = 0;
|
||||
#endif
|
||||
@ -197,7 +199,9 @@ main(int argc, char *argv[])
|
||||
SetupPads(); // Initialize input
|
||||
InitGUIThreads(); // Initialize GUI
|
||||
|
||||
#ifndef VWII
|
||||
in_neek = init_uneek_fs(ISFS_OPEN_READ|ISFS_OPEN_WRITE);
|
||||
#endif
|
||||
|
||||
MountAllDevices();
|
||||
InitNetworkThread(); // Initialize Network
|
||||
@ -207,7 +211,7 @@ main(int argc, char *argv[])
|
||||
InitGeckoThread();
|
||||
#endif
|
||||
InitThrobberThread(); // Initialize Throbber
|
||||
ISFS_Initialize(); // Initialize Nand
|
||||
ISFS_Initialize(); // Initialize Nand
|
||||
|
||||
LoadHBF();
|
||||
|
||||
@ -248,18 +252,16 @@ main(int argc, char *argv[])
|
||||
strftime(buffer, 80, "(%Y-%m-%d / %H:%M:%S)", current);
|
||||
xprintf("\nStarting HBF Debug Log %s\n", buffer);
|
||||
|
||||
#ifndef VWII
|
||||
if(!check_uneek_fs())
|
||||
{
|
||||
#endif
|
||||
if(AHBPROT_DISABLED)
|
||||
{
|
||||
IosPatch_RUNTIME(true, false, false, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
xprintf("Warning: no AHBPROT\n");
|
||||
}
|
||||
}
|
||||
#ifndef VWII
|
||||
DI2_Init(); // Init DVD
|
||||
#endif
|
||||
|
||||
if(strstr(Options.language, tr("STANDARD")))
|
||||
translate();
|
||||
@ -292,8 +294,12 @@ main(int argc, char *argv[])
|
||||
xprintf("Setting force_reload to NORELOAD\n");
|
||||
Settings.force_reload = "NORELOAD";
|
||||
xprintf("Loading boot.dol from online update\n");
|
||||
#ifdef VWII
|
||||
#ifdef STBOOTVWII
|
||||
LoadHomebrew ((Settings.device_dat + ":/apps/HomebrewFilter.vWii.Standalone/boot.dol").c_str());
|
||||
#elif VWII
|
||||
LoadHomebrew ((Settings.device_dat + ":/apps/HomebrewFilter.vWii/boot.dol").c_str());
|
||||
#elif STBOOT
|
||||
LoadHomebrew ((Settings.device_dat + ":/apps/HomebrewFilter.Standalone/boot.dol").c_str());
|
||||
#else
|
||||
LoadHomebrew ((Settings.device_dat + ":/apps/HomebrewFilter/boot.dol").c_str());
|
||||
#endif
|
||||
|
@ -22,6 +22,7 @@
|
||||
#define HW_REG_BASE 0xcd800000
|
||||
#define HW_ARMIRQMASK (HW_REG_BASE + 0x03c)
|
||||
#define HW_ARMIRQFLAG (HW_REG_BASE + 0x038)
|
||||
#define IsWiiU ( (*(u32*)0x0d8005A0 >> 16 ) == 0xCAFE )
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
@ -186,7 +186,12 @@ UpdateGUI (void *arg)
|
||||
}
|
||||
|
||||
// screenshoot
|
||||
if(WPAD_ButtonsDown(0) & WPAD_BUTTON_1 && WPAD_ButtonsDown(0) & WPAD_BUTTON_2)
|
||||
if(((WPAD_ButtonsDown(0) & (WPAD_BUTTON_1 | WPAD_CLASSIC_BUTTON_Y)) &&
|
||||
(WPAD_ButtonsDown(0) & (WPAD_BUTTON_2 | WPAD_CLASSIC_BUTTON_X)))
|
||||
|| ((WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_Y) &&
|
||||
(WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_X))
|
||||
|| ((PAD_ButtonsDown(0) & PAD_BUTTON_Y) &&
|
||||
(PAD_ButtonsDown(0) & PAD_BUTTON_X)))
|
||||
Screenshot();
|
||||
}
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ void __Wpad_PowerCallback(s32 chan)
|
||||
|
||||
s32 Wpad_Init(void)
|
||||
{
|
||||
WUPC_Init();
|
||||
s32 ret;
|
||||
|
||||
/* Initialize Wiimote subsystem */
|
||||
@ -39,6 +40,7 @@ void Wpad_Disconnect(void)
|
||||
WPAD_Disconnect(cnt);
|
||||
|
||||
/* Shutdown Wiimote subsystem */
|
||||
WUPC_Shutdown();
|
||||
WPAD_Shutdown();
|
||||
}
|
||||
|
||||
@ -65,11 +67,13 @@ u32 ButtonsHold(void)
|
||||
int i;
|
||||
u32 buttons = 0;
|
||||
|
||||
WUPC_UpdateButtonStats();
|
||||
WPAD_ScanPads();
|
||||
PAD_ScanPads();
|
||||
|
||||
for (i = 3; i >= 0; i--)
|
||||
{
|
||||
buttons |= WUPC_ButtonsHeld(i);
|
||||
buttons |= PAD_ButtonsHeld(i);
|
||||
buttons |= WPAD_ButtonsHeld(i);
|
||||
}
|
||||
@ -81,11 +85,13 @@ u32 ButtonsPressed(void)
|
||||
int i;
|
||||
u32 buttons = 0;
|
||||
|
||||
WUPC_UpdateButtonStats();
|
||||
WPAD_ScanPads();
|
||||
PAD_ScanPads();
|
||||
|
||||
for (i = 3; i >= 0; i--)
|
||||
{
|
||||
buttons |= WUPC_ButtonsDown(i);
|
||||
buttons |= PAD_ButtonsDown(i);
|
||||
buttons |= WPAD_ButtonsDown(i);
|
||||
}
|
||||
|
@ -2,6 +2,7 @@
|
||||
#define _WPAD_H_
|
||||
|
||||
#include <wiiuse/wpad.h>
|
||||
#include <wupc/wupc.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
|
@ -29,9 +29,10 @@ extern "C" void xprintf(const char *str, ...)
|
||||
if(Options.sdgecko)
|
||||
sdprintf(str);
|
||||
|
||||
else if(Options.wifigecko)
|
||||
if(Options.wifigecko)
|
||||
wifi_printf(str);
|
||||
else
|
||||
|
||||
if(!Options.wifigecko && !Options.sdgecko)
|
||||
gprintf(str);
|
||||
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
#define SVN_REV 43
|
||||
#define SVN_REV 47
|
||||
|
||||
int SvnRev()
|
||||
{
|
||||
|
87
tools/EditTMD.py
Executable file
@ -0,0 +1,87 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
# version 1.0
|
||||
|
||||
import os
|
||||
import sys
|
||||
import re
|
||||
import binascii
|
||||
import argparse
|
||||
import string
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('inputfile', action='store', help='Input a TMD file, or a directory that will be recursively searched for TMD files with filenames ending in \'tmd\' and \'tmd.out\'')
|
||||
parser.add_argument('-title', action='store', dest='title', help='Enter a new Title ID, which must be 16 hexadecimal characters long')
|
||||
version = parser.add_mutually_exclusive_group()
|
||||
version.add_argument('-versionH', action='store', dest='versionH', help='Enter a new version number in hex. 0 to FFFF/0x0 to 0xFFFF')
|
||||
version.add_argument('-versionD', action='store', type=int, dest='versionD', help='Enter a new version number in decimal. 0 to 65535')
|
||||
arguments = parser.parse_args()
|
||||
|
||||
newversion = -1
|
||||
newtitle = ''
|
||||
|
||||
if arguments.versionH is not None:
|
||||
if 0 <= int(arguments.versionH,16) <= 65535:
|
||||
newversion = int(arguments.versionH,16)
|
||||
versionPrintType = 'Hex'
|
||||
else:
|
||||
print 'The version number must be from 0 to FFFF - not ' + arguments.versionH
|
||||
sys.exit(0)
|
||||
|
||||
if arguments.versionD is not None:
|
||||
if 0 <= arguments.versionD <= 65535:
|
||||
newversion = arguments.versionD
|
||||
versionPrintType = 'Dec'
|
||||
else:
|
||||
print 'The version number must be from 0 to 65535 - not ' + str(arguments.versionD)
|
||||
sys.exit(0)
|
||||
|
||||
if arguments.title is not None:
|
||||
if (len(arguments.title) is 16) & all(c in string.hexdigits for c in arguments.title):
|
||||
newtitle = arguments.title
|
||||
else:
|
||||
print 'The Title ID must be 16 hexadecimal characters long'
|
||||
sys.exit(0)
|
||||
|
||||
print '*******\nEditTMD\n*******\n'
|
||||
|
||||
def tmdProcess(fpath):
|
||||
print '**********'
|
||||
with open(fpath) as f:
|
||||
tmd = f.read()
|
||||
tmdoffsets = [m.start() for m in re.finditer(b'Root-CA00000001-CP00000004', tmd)]
|
||||
if (len(tmdoffsets) != 1):
|
||||
print fpath + ' - Is this really a (decrypted) tmd file?'
|
||||
else:
|
||||
tmd = bytearray(tmd)
|
||||
offs = tmdoffsets[0]
|
||||
print fpath
|
||||
|
||||
if newtitle:
|
||||
print 'Title ID: ' + binascii.hexlify(tmd[offs+0x4C:offs+0x54]) + " -> " + arguments.title
|
||||
tmd[offs+0x4C:offs+0x54] = binascii.a2b_hex(arguments.title)
|
||||
|
||||
if newversion is not -1: # ' "if newversion:" is not good enough since the version can be 0, but it would still return false'
|
||||
if versionPrintType is 'Dec':
|
||||
print 'Version: ' + str(int(binascii.hexlify(tmd[offs+0x9C:offs+0x9E]),16)) + " -> " + str(newversion)
|
||||
if versionPrintType is 'Hex':
|
||||
print 'Version: ' + binascii.hexlify(tmd[offs+0x9C:offs+0x9E]).upper() + " -> " + "%0.4X" % newversion
|
||||
tmd[offs+0x9C:offs+0x9E] = binascii.a2b_hex("%0.4X" % newversion)
|
||||
|
||||
with open(fpath, "wb") as f:
|
||||
f.write(tmd)
|
||||
print ''
|
||||
|
||||
if os.path.exists(arguments.inputfile):
|
||||
if (os.path.isdir(arguments.inputfile)):
|
||||
for dname, dirs, files in os.walk(arguments.inputfile):
|
||||
for fname in files:
|
||||
if(fname.lower().endswith('tmd')) or (fname.lower().endswith('tmd.out')): # if(fname.lower() == 'tmd'):
|
||||
fpath = os.path.join(dname, fname)
|
||||
if os.path.isfile(fpath):
|
||||
tmdProcess(fpath)
|
||||
|
||||
elif os.path.isfile(arguments.inputfile):
|
||||
tmdProcess(arguments.inputfile)
|
||||
|
||||
print 'Finished'
|
BIN
tools/WifiGeckoReader.exe
Executable file
7
web/DOL.st.vwii/revisions
Normal file
@ -0,0 +1,7 @@
|
||||
47-
|
||||
46-
|
||||
45-
|
||||
44-
|
||||
43-
|
||||
42-
|
||||
end
|
@ -1,3 +1,7 @@
|
||||
47-
|
||||
46-
|
||||
45-
|
||||
44-
|
||||
43-
|
||||
42-
|
||||
41-
|
7
web/DOL.vwii/revisions
Normal file
@ -0,0 +1,7 @@
|
||||
47-
|
||||
46-
|
||||
45-
|
||||
44-
|
||||
43-
|
||||
42-
|
||||
end
|
@ -1,3 +1,7 @@
|
||||
47-
|
||||
46-
|
||||
45-
|
||||
44-
|
||||
43-
|
||||
42-
|
||||
41-
|
@ -7,7 +7,7 @@ Delete Category = Kategorie löschen
|
||||
Remove Category = Kategorie entfernen
|
||||
Select Category (-/+) = Kategorie auswählen (-/+)
|
||||
Options = Optionen
|
||||
Info =
|
||||
Info = Über
|
||||
Really remove? = Wirklich entfernen?
|
||||
Delete Forever? = Endgültig löschen?
|
||||
Yes = Ja
|
||||
@ -30,21 +30,20 @@ All = Alle
|
||||
unassigned = nicht zugeordnet
|
||||
<no description> = <keine Beschreibung>
|
||||
Page %i of %i = Seite %i von %i
|
||||
STANDARD =
|
||||
Theme =
|
||||
Themes =
|
||||
STANDARD = Standard
|
||||
Language = Sprache
|
||||
Languages = Sprachen
|
||||
Font = Schriftart
|
||||
Fonts = Schriftarten
|
||||
Slide Effect = Slide Effekt
|
||||
Slide Effect = Übergangs-Effekt
|
||||
Category remember = Kategorie merken
|
||||
last = letzte
|
||||
Number of Apps = Anzahl Apps
|
||||
Move = Verschieben
|
||||
Credits = Danksagungen
|
||||
Version: =
|
||||
Coder: = Programmierer:
|
||||
Coder: = Entwickler:
|
||||
Developers: = Entwickler:
|
||||
Designer: =
|
||||
Special thanks to: = Besonderen Dank an:
|
||||
activated = aktiviert
|
||||
@ -52,11 +51,11 @@ Activate = Aktivieren
|
||||
Deactivate = Deaktivieren
|
||||
Change Code = Code ändern
|
||||
please wait = Bitte warten
|
||||
Update =
|
||||
Update = Aktualisierung
|
||||
Download =
|
||||
New Rev is available for download = Neue Rev steht zum Download bereit
|
||||
Downloading file... = Lade Datei herunter...
|
||||
Do you want to update now ? = Jetzt updaten?
|
||||
Do you want to update now ? = Jetzt aktualisieren?
|
||||
Initialise network... = Initialisiere Netzwerk...
|
||||
Do you want to reboot now ? = Jetzt neu starten?
|
||||
Display = Bildschirm
|
||||
@ -66,7 +65,7 @@ Exit to System Menu = Beenden, zum Systemmenü
|
||||
Exit = Beenden
|
||||
Network Settings = Netzwerk
|
||||
Auto Connect = Automatisch verbinden
|
||||
Update Info = Update-Info
|
||||
Update Info = Aktualisierungs-Info
|
||||
No network connection = Keine Netzwerkverbindung
|
||||
Error = Fehler
|
||||
Error while reading file = Fehler beim Lesen der Datei
|
||||
@ -85,4 +84,15 @@ Menu = Menü
|
||||
Dialog box = Dialogfeld
|
||||
Device icon = Geräte-Symbol
|
||||
Storage Device = Speichergerät
|
||||
Navigation key exchange = Navigationstaste Austausch
|
||||
Navigation key exchange = Navigationstasten umkehren
|
||||
Show All = Alle Anzeigen
|
||||
Wifi Debug Log = Debug-Log über Wifi
|
||||
Theme = Thema
|
||||
Themes = Themen
|
||||
External Applications = Externe Anwendungen
|
||||
Launch Settings Editor GUI = Settings Editor GUI starten
|
||||
Exit to Wii U menu = Beenden, zum Wii-U-Menü
|
||||
Restart HBF = HBF neu starten
|
||||
Launch BootMii (IOS) = BootMii (IOS) starten
|
||||
Launch BootMii (Boot2) = BootMii (Boot2) starten
|
||||
SD Card Debug Log = Debug-Log auf SD-Karte
|
||||
|
@ -1,3 +0,0 @@
|
||||
43-
|
||||
42-
|
||||
end
|
79
web/updates
@ -1,3 +1,82 @@
|
||||
//rev47:
|
||||
- build against libruntimeiospatch 1.5.3
|
||||
- rename "SD Gecko" to "SD Card Debug Log" in Settings
|
||||
- rename "Wifi Gecko" to "Wifi Debug Log" in Settings
|
||||
- only scan list of available IOS once per session
|
||||
- disable 'SD Card Gecko' by default (debug log on SD Card),
|
||||
because it's causing a MASSIVE slow down when opening an
|
||||
app's details dialog the first time in a session, when
|
||||
using a shitty class 2 or whatever SD Card
|
||||
- fixed that newly build vWii forwarder accidently was the
|
||||
same than the Wii forwarder
|
||||
- fixup BootMii (IOS) detection on Wii
|
||||
- fixup showing device icon for apps
|
||||
- add ISO0 (any version) to list of known stub IOS
|
||||
(it's a custom IOS installed by several old apps)
|
||||
- update german translation
|
||||
|
||||
//rev46:
|
||||
- fix size and layout of device prompt in vWii builds
|
||||
- remove 'All' button from device prompt in vWii builds
|
||||
- re-enable 'SD Gecko' setting in vWii builds
|
||||
- support for Wii U Pro Controller trough FIX94's libwupc
|
||||
- support for Wii U Pro Controller in the installer
|
||||
- treat Y button on Game Cube Controller, Classic Controller
|
||||
and Wii U Pro Controller like 1 button on the Wii Remote
|
||||
- treat X button on Game Cube Controller, Classic Controller
|
||||
and Wii U Pro Controller like 2 button on the Wii Remote
|
||||
- press Z on Game Cube Controller or L Classic Controller or
|
||||
Wii U Pro Controller to open Settings menu
|
||||
- press R on Classic Controller or Wii U Pro Controller to
|
||||
open External Applications menu (no unused button left for
|
||||
Game Cube Controller)
|
||||
- press ZL on the Classic Controller or Wii U Pro Controller to
|
||||
open the device selection prompt (no unused button left for
|
||||
Game Cube Controller)
|
||||
- press ZR on the Classic Controller or Wii U Pro Controller to
|
||||
open the system selection prompt (no unused button left for
|
||||
Game Cube Controller) [only on Wii]
|
||||
- previously only the first controller was honoured, now all
|
||||
four are being connected, though only the first one of each
|
||||
kind (Wii Remote, Game Cube Controller or Wii U Pro Controller)
|
||||
can be used, each additional non-unique controller is ignored
|
||||
- in partition mounter replace debug_printf with xprintf
|
||||
- disable several DVD and Memory Card related functions in vWii
|
||||
- don't initialize DVD drive on start in vWii builds
|
||||
- allow 'SD Gecko' and 'Wifi Gecko' in parallel
|
||||
- update german translation
|
||||
|
||||
//rev45:
|
||||
- built against libruntimeiospatch 1.5.2
|
||||
- fixed loading newly downloaded HomebrewFilter from online
|
||||
update of standalone builds
|
||||
- always return 0 (not found) for bootmii on vWii
|
||||
- add IOS5 rev 65280 to list of stub IOS
|
||||
- fix Settings Editor GUI path for SD Gecko in GC MC Slot A
|
||||
- fix 'Exit to Wii U menu' not visible in vWii builds
|
||||
- hide 'SD Gecko' setting in vWii builds
|
||||
- various Makefile improvements
|
||||
- other minor or internal changes
|
||||
|
||||
//rev44:
|
||||
- built against libruntimeiospatch 1.5.1
|
||||
- apply XFLAGS (flag specifying build-type (Wii/vWii,
|
||||
installer/forwarder) to CXXFLAGS not just CFLAGS
|
||||
* this will speed up HBF on vWii.
|
||||
x only the first time you choose an application will
|
||||
delay 1 or 2 seconds (as we are scanning all available
|
||||
IOSes, for you to choose a different IOS to start an
|
||||
application with, before it always delayed)
|
||||
x same for external launchers menu
|
||||
x no more delay when opening the settings
|
||||
* this will fix upgrading HBF via network on vWii.
|
||||
x previously it was accidently downloading the Wii version
|
||||
* this will fix upgrading standalone HBF via network.
|
||||
x previously it was accidently downloading the installer
|
||||
* ... yeah, one variable, huge impact ...
|
||||
- move creation of distribution files into dist/
|
||||
- bump channel version to 44 (accidently skipped for 43)
|
||||
|
||||
//rev43:
|
||||
- added chinese translation and font file (thanks to kavid)
|
||||
- fixed downloading japanese font file from server
|
||||
|