[ion/3ds] Make simulator work again

This commit is contained in:
M4x1m3
2021-02-06 17:00:14 +01:00
parent 3e3a6347a6
commit 7733378bdc
5 changed files with 70 additions and 1 deletions

View File

@@ -2,11 +2,13 @@
ion_src += $(addprefix ion/src/simulator/3ds/, \
main.cpp \
callback.cpp \
clipboard.cpp \
display.cpp \
framebuffer.cpp \
telemetry_init.cpp \
keyboard.cpp \
events_keyboard.cpp \
events.cpp \
driver/display.cpp \
driver/language.cpp \
driver/led.cpp \
@@ -22,8 +24,10 @@ sdl_simu_needs_to_be_removed += $(addprefix ion/src/simulator/shared/, \
dummy/led.cpp \
dummy/usb.cpp \
dummy/battery.cpp \
clipboard.cpp \
display.cpp:-headless \
events_keyboard.cpp:-headless \
events.cpp \
framebuffer_base.cpp \
keyboard_sdl.cpp:-headless \
main_sdl.cpp:-headless \

View File

@@ -0,0 +1,18 @@
#include <ion/clipboard.h>
#include <ion.h>
#include <string.h>
namespace Ion {
namespace Clipboard {
uint32_t localClipboardVersion;
void write(const char * text) {
}
const char * read() {
return nullptr;
}
}
}

View File

@@ -13,7 +13,7 @@ bool Ion::USB::isEnumerated() {
void Ion::USB::clearEnumerationInterrupt() {
}
void Ion::USB::DFU() {
void Ion::USB::DFU(bool) {
}
void Ion::USB::enable() {

View File

@@ -0,0 +1,23 @@
#include "events.h"
#include <ion/events.h>
namespace Ion {
namespace Events {
void didPressNewKey() {
}
char * sharedExternalTextBuffer() {
static char buffer[sharedExternalTextBufferSize];
return buffer;
}
const char * Event::text() const {
if (*this == ExternalText) {
return const_cast<const char *>(sharedExternalTextBuffer());
}
return defaultText();
}
}
}

View File

@@ -0,0 +1,24 @@
#ifndef ION_SIMULATOR_EVENTS_H
#define ION_SIMULATOR_EVENTS_H
#include <ion/events.h>
namespace Ion {
namespace Simulator {
namespace Events {
void dumpEventCount(int i);
void logAfter(int numberOfEvents);
}
}
namespace Events {
static constexpr int sharedExternalTextBufferSize = 0;
char * sharedExternalTextBuffer();
}
}
#endif