mirror of
https://github.com/wiiu-env/AutobootModule.git
synced 2024-11-22 02:49:16 +01:00
Update .clang-format to change comment and macro formatting
This commit is contained in:
parent
beedc7513c
commit
4512de73da
@ -3,6 +3,7 @@ BasedOnStyle: LLVM
|
||||
AccessModifierOffset: -4
|
||||
AlignAfterOpenBracket: Align
|
||||
AlignConsecutiveAssignments: None
|
||||
AlignConsecutiveMacros: AcrossEmptyLinesAndComments
|
||||
AlignOperands: Align
|
||||
AllowAllArgumentsOnNextLine: false
|
||||
AllowAllConstructorInitializersOnNextLine: false
|
||||
@ -56,7 +57,7 @@ SpaceBeforeInheritanceColon: true
|
||||
SpaceBeforeParens: ControlStatements
|
||||
SpaceBeforeRangeBasedForLoopColon: true
|
||||
SpaceInEmptyParentheses: false
|
||||
SpacesBeforeTrailingComments: 0
|
||||
SpacesBeforeTrailingComments: 1
|
||||
SpacesInAngles: false
|
||||
SpacesInCStyleCastParentheses: false
|
||||
SpacesInContainerLiterals: false
|
||||
|
@ -32,9 +32,9 @@ void bootWiiUMenu() {
|
||||
nn::act::SlotNo defaultSlot = nn::act::GetDefaultAccount();
|
||||
nn::act::Finalize();
|
||||
|
||||
if (defaultSlot) {//normal menu boot
|
||||
if (defaultSlot) { //normal menu boot
|
||||
SYSLaunchMenu();
|
||||
} else {//show mii select
|
||||
} else { //show mii select
|
||||
_SYSLaunchMenuWithCheckingAccount(slot);
|
||||
}
|
||||
}
|
||||
@ -50,7 +50,7 @@ void handleAccountSelection() {
|
||||
nn::act::Initialize();
|
||||
nn::act::SlotNo defaultSlot = nn::act::GetDefaultAccount();
|
||||
|
||||
if (!defaultSlot) {// No default account is set.
|
||||
if (!defaultSlot) { // No default account is set.
|
||||
std::vector<std::shared_ptr<AccountInfo>> accountInfoList;
|
||||
for (int32_t i = 0; i < 13; i++) {
|
||||
if (!nn::act::IsSlotOccupied(i)) {
|
||||
@ -134,9 +134,9 @@ void bootHomebrewChannel() {
|
||||
|
||||
// test if the OHBC or HBC is installed
|
||||
if (IOSUHAX_FSA_GetStat(fsaFd, "/vol/storage_slccmpt01/title/00010001/4f484243/content/00000000.app", &stat) >= 0) {
|
||||
titleId = 0x000100014F484243L;// 'OHBC'
|
||||
titleId = 0x000100014F484243L; // 'OHBC'
|
||||
} else if (IOSUHAX_FSA_GetStat(fsaFd, "/vol/storage_slccmpt01/title/00010001/4c554c5a/content/00000000.app", &stat) >= 0) {
|
||||
titleId = 0x000100014C554C5AL;// 'LULZ'
|
||||
titleId = 0x000100014C554C5AL; // 'LULZ'
|
||||
} else {
|
||||
DEBUG_FUNCTION_LINE("Cannot find HBC, booting vWii System Menu");
|
||||
}
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include "MenuUtils.h"
|
||||
|
||||
// buffer width
|
||||
#define TV_WIDTH 0x500
|
||||
#define TV_WIDTH 0x500
|
||||
#define DRC_WIDTH 0x380
|
||||
|
||||
bool DrawUtils::isBackBuffer;
|
||||
|
@ -3,7 +3,7 @@
|
||||
#include <cstdint>
|
||||
|
||||
// visible screen sizes
|
||||
#define SCREEN_WIDTH 854
|
||||
#define SCREEN_WIDTH 854
|
||||
#define SCREEN_HEIGHT 480
|
||||
|
||||
union Color {
|
||||
|
@ -33,11 +33,11 @@ const char *autoboot_config_strings[] = {
|
||||
|
||||
template<typename... Args>
|
||||
std::string string_format(const std::string &format, Args... args) {
|
||||
int size_s = std::snprintf(nullptr, 0, format.c_str(), args...) + 1;// Extra space for '\0'
|
||||
int size_s = std::snprintf(nullptr, 0, format.c_str(), args...) + 1; // Extra space for '\0'
|
||||
auto size = static_cast<size_t>(size_s);
|
||||
auto buf = std::make_unique<char[]>(size);
|
||||
std::snprintf(buf.get(), size, format.c_str(), args...);
|
||||
return std::string(buf.get(), buf.get() + size - 1);// We don't want the '\0' inside
|
||||
return std::string(buf.get(), buf.get() + size - 1); // We don't want the '\0' inside
|
||||
}
|
||||
|
||||
int32_t readAutobootOption(std::string &configPath) {
|
||||
@ -222,7 +222,7 @@ nn::act::SlotNo handleAccountSelectScreen(const std::vector<std::shared_ptr<Acco
|
||||
for (uint32_t x = 0; x < target_width; x++) {
|
||||
uint32_t col = (((x) *width / target_width) + ((target_height - y - 1) * height / target_height) * width) * 4;
|
||||
uint32_t colVal = ((uint32_t *) &val->miiImageBuffer[col + 1])[0];
|
||||
if (colVal == 0x00808080) {// Remove the green background.
|
||||
if (colVal == 0x00808080) { // Remove the green background.
|
||||
DrawUtils::drawPixel(x + xOffset, y + yOffset, COLOR_BACKGROUND.r, COLOR_BACKGROUND.g, COLOR_BACKGROUND.b, COLOR_BACKGROUND.a);
|
||||
} else {
|
||||
DrawUtils::drawPixel(x + xOffset, y + yOffset, val->miiImageBuffer[col + 1], val->miiImageBuffer[col + 2], val->miiImageBuffer[col + 3], val->miiImageBuffer[col]);
|
||||
|
@ -87,7 +87,7 @@ bool getQuickBoot() {
|
||||
if (bootCheck == 0) {
|
||||
nn::sl::Initialize(MEMAllocFromDefaultHeapEx, MEMFreeToDefaultHeap);
|
||||
char path[0x80];
|
||||
nn::sl::GetDefaultDatabasePath(path, 0x80, 0x0005001010066000);// ECO process
|
||||
nn::sl::GetDefaultDatabasePath(path, 0x80, 0x0005001010066000); // ECO process
|
||||
FSCmdBlock cmdBlock;
|
||||
FSInitCmdBlock(&cmdBlock);
|
||||
|
||||
@ -101,7 +101,7 @@ bool getQuickBoot() {
|
||||
auto database = new nn::sl::LaunchInfoDatabase;
|
||||
database->Load(fileStream, nn::sl::REGION_EUR);
|
||||
|
||||
CCRAppLaunchParam data;// load sys caffeine data
|
||||
CCRAppLaunchParam data; // load sys caffeine data
|
||||
// load app launch param
|
||||
CCRSysCaffeineGetAppLaunchParam(&data);
|
||||
|
||||
@ -197,7 +197,7 @@ bool getQuickBoot() {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (info.titleId == 0x0005001010004000L) {// OSv0
|
||||
if (info.titleId == 0x0005001010004000L) { // OSv0
|
||||
DEBUG_FUNCTION_LINE("Launching vWii System Menu");
|
||||
bootvWiiMenu();
|
||||
|
||||
|
@ -105,7 +105,7 @@ void initExternalStorage() {
|
||||
int tries = 0;
|
||||
bool found = false;
|
||||
|
||||
while (tries < 1200) {// Wait up to 20 seconds, like the Wii U Menu
|
||||
while (tries < 1200) { // Wait up to 20 seconds, like the Wii U Menu
|
||||
int32_t numItems = nn::spm::GetStorageList(items, 0x20);
|
||||
|
||||
DEBUG_FUNCTION_LINE("Number of items: %d", numItems);
|
||||
|
@ -17,7 +17,7 @@ void initLogging() {
|
||||
cafeLogInit = WHBLogCafeInit();
|
||||
udpLogInit = WHBLogUdpInit();
|
||||
}
|
||||
#endif// DEBUG
|
||||
#endif // DEBUG
|
||||
}
|
||||
|
||||
void deinitLogging() {
|
||||
@ -34,5 +34,5 @@ void deinitLogging() {
|
||||
WHBLogUdpDeinit();
|
||||
udpLogInit = false;
|
||||
}
|
||||
#endif// DEBUG
|
||||
#endif // DEBUG
|
||||
}
|
@ -10,7 +10,7 @@ extern "C" {
|
||||
#ifdef DEBUG
|
||||
|
||||
#define __FILENAME_X__ (strrchr(__FILE__, '\\') ? strrchr(__FILE__, '\\') + 1 : __FILE__)
|
||||
#define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILENAME_X__)
|
||||
#define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILENAME_X__)
|
||||
|
||||
#define DEBUG_FUNCTION_LINE(FMT, ARGS...) \
|
||||
do { \
|
||||
@ -24,7 +24,7 @@ extern "C" {
|
||||
|
||||
#else
|
||||
|
||||
#define DEBUG_FUNCTION_LINE(FMT, ARGS...) while (0)
|
||||
#define DEBUG_FUNCTION_LINE(FMT, ARGS...) while (0)
|
||||
|
||||
#define DEBUG_FUNCTION_LINE_WRITE(FMT, ARGS...) while (0)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user