Skip to content
This repository has been archived by the owner on Jul 3, 2024. It is now read-only.

Commit

Permalink
compile the lite version of the app
Browse files Browse the repository at this point in the history
To change the compiling, change the LITE variable in retain_vars.h
  • Loading branch information
yahya14 committed Jul 26, 2017
1 parent b325df8 commit c848f0a
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 2 deletions.
Binary file added meta_lite/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions meta_lite/meta.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<app version="1">
<name>SwapDRC Lite</name>
<coder>OatmealDome and Yahya14</coder>
<url>https://gbatemp.net/threads/swap-drc-for-tv-only-wii-u-games.478026/#post-7458492</url>
<version>1.3</version>
<release_date>201707190000000</release_date>
<short_description>Switch TV display onto the gamepad</short_description>
<long_description>Switch Display, Audio, and Gamepad Sensor Bar:
- Press L and Minus together.
- Press the TV button.

Switch on/off Gamepad LCD:
- Press and hold R-Stick for 3 seconds.

Special thanks to: Maschell, dimok, NWPlayer123, Brienj, and BKOOL999.
</long_description>
<category>tool</category>
</app>
35 changes: 33 additions & 2 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,15 @@ int Menu_Main()
InitSocketFunctionPointers();
InitGX2FunctionPointers();
InitSysFunctionPointers();
InitFSFunctionPointers();
InitVPadFunctionPointers();
InitAXFunctionPointers();
InitProcUIFunctionPointers();
#if !LITE
InitFSFunctionPointers();
#endif


log_init("192.168.0.181");
log_init("192.168.2.18");

SetupKernelCallback();

Expand All @@ -126,8 +129,11 @@ int Menu_Main()
}

ApplyPatches();

#if !LITE
log_printf("Starting the TCPGecko server.\n");
start_pygecko();
#endif

if(!isInMiiMakerHBL()){ //Starting the application
// Check for Splatoon (Gambit)
Expand Down Expand Up @@ -165,6 +171,27 @@ int Menu_Main()
OSScreenEnableEx(0, 1);
OSScreenEnableEx(1, 1);

#if LITE
OSScreenClearBufferEx(0, 0);
OSScreenClearBufferEx(1, 0);

PRINT_TEXT2(0, 1, "SwapDRC Lite is now ready...");
PRINT_TEXT2(0, 3, "Tip: Swap screens with the TV button.");

OSScreenFlipBuffersEx(0);
OSScreenFlipBuffersEx(1);
os_sleep(2);

MEM1_free(screenBuffer);
screenBuffer = NULL;

memoryRelease();

isFirstBoot = 0;
SYSLaunchMenu();

#else // LITE

// Render IP selector and check for buttons
u_serv_ip ip;
ip.full = ((192 << 24) | (168 << 16) | (2 << 8) | (18 << 0));
Expand Down Expand Up @@ -347,9 +374,11 @@ int Menu_Main()

log_printf("Returning to application.\n");
log_printf("De-initializing logging.\n");
log_deinit();

isFirstBoot = 0;
SYSLaunchMenu();
#endif
}
return EXIT_RELAUNCH_ON_LOAD;
}
Expand All @@ -358,7 +387,9 @@ int Menu_Main()
Patching all the functions!!!
*/
void ApplyPatches(){
#if !LITE
PatchInvidualMethodHooks(method_hooks_cafiine, method_hooks_size_cafiine, method_calls_cafiine);
#endif
PatchInvidualMethodHooks(method_hooks_voice_swapping, method_hooks_size_voice_swapping, method_calls_voice_swapping);
PatchInvidualMethodHooks(method_hooks_video_swapping, method_hooks_size_video_swapping, method_calls_video_swapping);
PatchInvidualMethodHooks(method_hooks_vpad, method_hooks_size_vpad, method_calls_vpad);
Expand Down
4 changes: 4 additions & 0 deletions src/retain_vars.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#ifndef _RETAIN_VARS_H_
#define _RETAIN_VARS_H_

//for pre-compiling the app
#define LITE 0 // 0 = default, 1 = lite version (no tcpgecko and cafiine)


#include "common/types.h"
#include "utils/voice_info.hpp"
#include "patcher/cafiine_function_patcher.h"
Expand Down

0 comments on commit c848f0a

Please sign in to comment.