mirror of
https://github.com/BernardoGiordano/Checkpoint
synced 2024-12-01 04:49:10 +00:00
Comment for now
This commit is contained in:
parent
75d62c4c49
commit
1000a8d333
4 changed files with 11 additions and 27 deletions
|
@ -77,7 +77,7 @@ private:
|
|||
}
|
||||
|
||||
#if defined(_3DS)
|
||||
const std::string mPath = "/3ds/Checkpoint/checkpoint.log";
|
||||
const std::string mPath = "sdmc:/3ds/Checkpoint/checkpoint.log";
|
||||
#elif defined(__SWITCH__)
|
||||
const std::string mPath = "/switch/Checkpoint/checkpoint.log";
|
||||
#else
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#ifndef SDLHELPER_HPP
|
||||
#define SDLHELPER_HPP
|
||||
|
||||
#include "logger.hpp"
|
||||
#include "SDL_FontCache.h"
|
||||
#include "colors.hpp"
|
||||
#include "main.hpp"
|
||||
|
|
|
@ -24,17 +24,17 @@ static FC_Font* getFontFromMap(int size)
|
|||
bool SDLH_Init(void)
|
||||
{
|
||||
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER) < 0) {
|
||||
fprintf(stderr, "SDL_Init: %s\n", SDL_GetError());
|
||||
Logger::getInstance().error("SDL_Init: %s\n", SDL_GetError());
|
||||
return false;
|
||||
}
|
||||
s_window = SDL_CreateWindow("Checkpoint", 0, 0, 1280, 720, SDL_WINDOW_FULLSCREEN);
|
||||
if (!s_window) {
|
||||
fprintf(stderr, "SDL_CreateWindow: %s\n", SDL_GetError());
|
||||
Logger::getInstance().error("SDL_CreateWindow: %s\n", SDL_GetError());
|
||||
return false;
|
||||
}
|
||||
s_renderer = SDL_CreateRenderer(s_window, 0, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);
|
||||
if (!s_renderer) {
|
||||
fprintf(stderr, "SDL_CreateRenderer: %s\n", SDL_GetError());
|
||||
Logger::getInstance().error("SDL_CreateRenderer: %s\n", SDL_GetError());
|
||||
return false;
|
||||
}
|
||||
SDL_SetRenderDrawBlendMode(s_renderer, SDL_BLENDMODE_BLEND);
|
||||
|
@ -42,7 +42,7 @@ bool SDLH_Init(void)
|
|||
|
||||
const int img_flags = IMG_INIT_PNG | IMG_INIT_JPG;
|
||||
if ((IMG_Init(img_flags) & img_flags) != img_flags) {
|
||||
fprintf(stderr, "IMG_Init: %s\n", IMG_GetError());
|
||||
Logger::getInstance().error("IMG_Init: %s\n", IMG_GetError());
|
||||
return false;
|
||||
}
|
||||
SDLH_LoadImage(&s_star, "romfs:/star.png");
|
||||
|
|
|
@ -26,29 +26,10 @@
|
|||
|
||||
#include "util.hpp"
|
||||
|
||||
static Result consoleDisplayError(const std::string& message, Result res)
|
||||
{
|
||||
consoleInit(NULL);
|
||||
|
||||
printf("\x1b[2;29HCheckpoint v%d.%d.%d-%s", VERSION_MAJOR, VERSION_MINOR, VERSION_MICRO, GIT_REV);
|
||||
printf("\x1b[5;2HError during startup: \x1b[31m0x%08X\x1b[0m", res);
|
||||
printf("\x1b[8;2HDescription: \x1b[33m%s\x1b[0m", message.c_str());
|
||||
printf("\x1b[45;32HPress PLUS to exit.");
|
||||
consoleUpdate(NULL);
|
||||
while (appletMainLoop() && !(hidKeysDown(CONTROLLER_P1_AUTO) & KEY_PLUS)) {
|
||||
hidScanInput();
|
||||
}
|
||||
|
||||
consoleExit(NULL);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
void servicesExit(void)
|
||||
{
|
||||
ftp_exit();
|
||||
nifmExit();
|
||||
// debug
|
||||
socketExit();
|
||||
|
||||
freeIcons();
|
||||
|
@ -64,9 +45,11 @@ void servicesExit(void)
|
|||
|
||||
Result servicesInit(void)
|
||||
{
|
||||
if (appletGetAppletType() != AppletType_Application) {
|
||||
return consoleDisplayError("Please run Checkpoint under Atmosphere title takeover.", -1);
|
||||
}
|
||||
// if (appletGetAppletType() != AppletType_Application) {
|
||||
// return consoleDisplayError("Please run Checkpoint under Atmosphere title takeover.", -1);
|
||||
// }
|
||||
|
||||
Logger::getInstance().info("Starting Checkpoint loading...");
|
||||
|
||||
// debug
|
||||
Result socinit = 0;
|
||||
|
|
Loading…
Reference in a new issue