Switch: Cleanup some includes.

Disable dlopen and tty checks too.
This commit is contained in:
M4xw 2019-09-28 09:22:38 -07:00 committed by Unknown W. Brackets
parent a8213e80f7
commit 15a9a0ac8f
5 changed files with 17 additions and 2 deletions

View File

@ -68,7 +68,7 @@ ConsoleListener::ConsoleListener() : bHidden(true)
bUseColor = false;
#elif defined(IOS)
bUseColor = false;
#elif PPSSPP_PLATFORM(UWP)
#elif PPSSPP_PLATFORM(UWP) || PPSSPP_PLATFORM(SWITCH)
bUseColor = false;
#elif defined(_MSC_VER)
bUseColor = false;

View File

@ -35,8 +35,10 @@
#include <unistd.h>
#include <sys/stat.h>
#include <ctype.h>
#if !PPSSPP_PLATFORM(SWITCH)
#include <dlfcn.h>
#endif
#endif
const std::string INDEX_FILENAME = ".ppsspp-index.lst";
@ -809,6 +811,7 @@ void VirtualDiscFileSystem::HandlerLogger(void *arg, HandlerHandle handle, LogTy
}
VirtualDiscFileSystem::Handler::Handler(const char *filename, VirtualDiscFileSystem *const sys) {
#if !PPSSPP_PLATFORM(SWITCH)
#ifdef _WIN32
#if PPSSPP_PLATFORM(UWP)
#define dlopen(name, ignore) (void *)LoadPackagedLibrary(ConvertUTF8ToWString(name).c_str(), 0)
@ -847,13 +850,14 @@ VirtualDiscFileSystem::Handler::Handler(const char *filename, VirtualDiscFileSys
#undef dlsym
#undef dlclose
#endif
#endif
}
VirtualDiscFileSystem::Handler::~Handler() {
if (library != NULL) {
Shutdown();
#if !PPSSPP_PLATFORM(UWP)
#if !PPSSPP_PLATFORM(UWP) && !PPSSPP_PLATFORM(SWITCH)
#ifdef _WIN32
FreeLibrary((HMODULE)library);
#else

View File

@ -18,6 +18,10 @@
#include <string>
#include <cstring>
#ifndef _MSC_VER
#include <strings.h>
#endif
#include "Core/Debugger/Breakpoints.h"
#include "Core/Debugger/SymbolMap.h"
#include "Core/Debugger/DebugInterface.h"

View File

@ -1,8 +1,13 @@
#include "ppsspp_config.h"
#ifdef _WIN32
#include <windows.h>
#undef min
#undef max
#endif
#if PPSSPP_PLATFORM(SWITCH)
#define _GNU_SOURCE
#include <stdio.h>
#endif
#include <string.h>
#include <stdarg.h>
#include <errno.h>

View File

@ -13,6 +13,8 @@
#ifdef _MSC_VER
#pragma warning (disable:4996)
#define strncasecmp _strnicmp
#else
#include <strings.h>
#endif
// Dumb wrapper around itoa, providing a buffer. Declare this on the stack.