mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-27 21:54:15 +01:00
-now using compiler directives to make it easy to compile wiiflow lite or wfl_as wiiiflow. just uncomment line 5 in sys.h to compile as wfl as wiiflow.
This commit is contained in:
parent
c48ea85348
commit
143cb7e941
BIN
data/wfstub.bin
Normal file
BIN
data/wfstub.bin
Normal file
Binary file not shown.
@ -1,10 +1,16 @@
|
|||||||
|
|
||||||
|
#include "loader/sys.h"
|
||||||
|
|
||||||
#define APP_NAME "WiiFlow Lite"
|
#define APP_NAME "WiiFlow Lite"
|
||||||
#define APP_VERSION "4.5.0"
|
#define APP_VERSION "4.5.0"
|
||||||
#define SVN_REV "1162"
|
#define SVN_REV "1162"
|
||||||
|
|
||||||
#define APP_DATA_DIR "wiiflow"
|
#define APP_DATA_DIR "wiiflow"
|
||||||
|
#ifdef APP_WIIFLOW
|
||||||
|
#define APPS_DIR "apps/wiiflow"
|
||||||
|
#else
|
||||||
#define APPS_DIR "apps/wiiflow_lite"
|
#define APPS_DIR "apps/wiiflow_lite"
|
||||||
|
#endif
|
||||||
|
|
||||||
//#define EMU_NANDS_DIR "nands"
|
//#define EMU_NANDS_DIR "nands"
|
||||||
#define GAMES_DIR "%s:/wbfs"
|
#define GAMES_DIR "%s:/wbfs"
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include "homebrew.h"
|
#include "homebrew.h"
|
||||||
|
#include "loader/sys.h"
|
||||||
#include "banner/AnimatedBanner.h"
|
#include "banner/AnimatedBanner.h"
|
||||||
#include "fileOps/fileOps.h"
|
#include "fileOps/fileOps.h"
|
||||||
#include "gecko/gecko.hpp"
|
#include "gecko/gecko.hpp"
|
||||||
@ -26,8 +27,13 @@ u8 *appbooter_ptr = NULL;
|
|||||||
u32 appbooter_size = 0;
|
u32 appbooter_size = 0;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
#ifdef APP_WIIFLOW
|
||||||
|
extern const u8 wfstub_bin[];
|
||||||
|
extern const u32 wfstub_bin_size;
|
||||||
|
#else
|
||||||
extern const u8 stub_bin[];
|
extern const u8 stub_bin[];
|
||||||
extern const u32 stub_bin_size;
|
extern const u32 stub_bin_size;
|
||||||
|
#endif
|
||||||
|
|
||||||
u8 valid = 0;
|
u8 valid = 0;
|
||||||
|
|
||||||
@ -136,7 +142,11 @@ void writeStub()
|
|||||||
|
|
||||||
/* Extract our stub */
|
/* Extract our stub */
|
||||||
u32 StubSize = 0;
|
u32 StubSize = 0;
|
||||||
|
#ifdef APP_WIIFLOW
|
||||||
|
u8 *Stub = DecompressCopy(wfstub_bin, wfstub_bin_size, &StubSize);
|
||||||
|
#else
|
||||||
u8 *Stub = DecompressCopy(stub_bin, stub_bin_size, &StubSize);
|
u8 *Stub = DecompressCopy(stub_bin, stub_bin_size, &StubSize);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Copy our own stub into memory */
|
/* Copy our own stub into memory */
|
||||||
memcpy((void*)0x80001800, Stub, StubSize);
|
memcpy((void*)0x80001800, Stub, StubSize);
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
#ifndef _SYS_H_
|
#ifndef _SYS_H_
|
||||||
#define _SYS_H_
|
#define _SYS_H_
|
||||||
|
|
||||||
|
//#define APP_WIIFLOW
|
||||||
|
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -385,8 +385,13 @@ bool CMenu::init()
|
|||||||
m_locked = m_cfg.getString("GENERAL", "parent_code", "").size() >= 4;
|
m_locked = m_cfg.getString("GENERAL", "parent_code", "").size() >= 4;
|
||||||
|
|
||||||
/* Switch the WFLA and DWFA when using official wiiflow */
|
/* Switch the WFLA and DWFA when using official wiiflow */
|
||||||
|
#ifdef APP_WIIFLOW
|
||||||
|
if(m_cfg.getString("GENERAL", "returnto", "DWFA") == "WFLA")
|
||||||
|
m_cfg.setString("GENERAL", "returnto", "DWFA");
|
||||||
|
#else
|
||||||
if(m_cfg.getString("GENERAL", "returnto", "WFLA") == "DWFA")
|
if(m_cfg.getString("GENERAL", "returnto", "WFLA") == "DWFA")
|
||||||
m_cfg.setString("GENERAL", "returnto", "WFLA");
|
m_cfg.setString("GENERAL", "returnto", "WFLA");
|
||||||
|
#endif
|
||||||
|
|
||||||
/* set WIIFLOW_DEF exit to option */
|
/* set WIIFLOW_DEF exit to option */
|
||||||
/* 0 thru 2 of exit to enum (EXIT_TO_MENU, EXIT_TO_HBC, EXIT_TO_WIIU) in sys.h */
|
/* 0 thru 2 of exit to enum (EXIT_TO_MENU, EXIT_TO_HBC, EXIT_TO_WIIU) in sys.h */
|
||||||
|
@ -225,9 +225,11 @@ bool CMenu::_ExitTo(void)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//if(m_cfg.getBool("NEEK2O", "launchwiiflow", true))
|
#ifdef APP_WIIFLOW
|
||||||
// exitHandler(EXIT_TO_WFNK2O);
|
if(m_cfg.getBool("NEEK2O", "launchwiiflow", true))
|
||||||
//else
|
exitHandler(EXIT_TO_WFNK2O);
|
||||||
|
else
|
||||||
|
#endif
|
||||||
exitHandler(EXIT_TO_SMNK2O);
|
exitHandler(EXIT_TO_SMNK2O);
|
||||||
/* if exiting to Neek2o we must set the EmuNand Path for sys_exit() in sys.c */
|
/* if exiting to Neek2o we must set the EmuNand Path for sys_exit() in sys.c */
|
||||||
const char *EmuNandPath = NULL;
|
const char *EmuNandPath = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user