mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
[ion/simulator] Get rid of the headless target
This commit is contained in:
@@ -1,11 +0,0 @@
|
||||
#include <ion/events.h>
|
||||
|
||||
namespace Ion {
|
||||
namespace Events {
|
||||
|
||||
Event getPlatformEvent() {
|
||||
return None;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
#include <ion/keyboard.h>
|
||||
|
||||
namespace Ion {
|
||||
namespace Keyboard {
|
||||
|
||||
State scan() {
|
||||
return State();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
#include <ion/timing.h>
|
||||
|
||||
void Ion::Timing::msleep(uint32_t ms) {
|
||||
}
|
||||
@@ -3,35 +3,28 @@ ion_src += $(addprefix ion/src/shared/dummy/, \
|
||||
battery.cpp \
|
||||
display.cpp \
|
||||
exam_mode.cpp \
|
||||
events_platform.cpp:+headless \
|
||||
fcc_id.cpp \
|
||||
keyboard.cpp:+headless \
|
||||
led.cpp \
|
||||
power.cpp \
|
||||
serial_number.cpp \
|
||||
stack.cpp \
|
||||
timing_msleep.cpp:+headless \
|
||||
usb.cpp \
|
||||
)
|
||||
|
||||
ion_src += $(addprefix ion/src/simulator/shared/, \
|
||||
dummy/keyboard.cpp:+headless \
|
||||
dummy/window.cpp:+headless \
|
||||
clipboard.cpp \
|
||||
console_stdio.cpp:-consoledisplay \
|
||||
console.cpp \
|
||||
crc32.cpp \
|
||||
display.cpp:-headless \
|
||||
display.cpp \
|
||||
events.cpp \
|
||||
events_platform.cpp:-headless \
|
||||
events_platform.cpp \
|
||||
framebuffer.cpp \
|
||||
framebuffer_png.cpp:+headless \
|
||||
keyboard.cpp:-headless \
|
||||
layout.cpp:-headless \
|
||||
keyboard.cpp \
|
||||
layout.cpp \
|
||||
main.cpp \
|
||||
random.cpp \
|
||||
timing.cpp \
|
||||
timing_msleep.cpp:-headless \
|
||||
window.cpp:-headless \
|
||||
window.cpp \
|
||||
)
|
||||
|
||||
ion_simulator_assets = background.jpg horizontal_arrow.png vertical_arrow.png round.png small_squircle.png large_squircle.png
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
#include "../keyboard.h"
|
||||
|
||||
namespace Ion {
|
||||
namespace Simulator {
|
||||
namespace Keyboard {
|
||||
|
||||
void keyDown(Ion::Keyboard::Key k) {
|
||||
}
|
||||
|
||||
void keyUp(Ion::Keyboard::Key k) {
|
||||
}
|
||||
|
||||
bool scanHandlesSDLKey(SDL_Scancode key) {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
#include "../window.h"
|
||||
|
||||
namespace Ion {
|
||||
namespace Simulator {
|
||||
namespace Window {
|
||||
|
||||
void init() {
|
||||
Ion::Simulator::Framebuffer::setActive(false);
|
||||
}
|
||||
|
||||
void quit() {
|
||||
}
|
||||
|
||||
void setNeedsRefresh() {
|
||||
}
|
||||
|
||||
void relayout() {
|
||||
}
|
||||
|
||||
void refresh() {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,24 @@
|
||||
#include <ion/timing.h>
|
||||
#include "window.h"
|
||||
#include <chrono>
|
||||
#include <SDL.h>
|
||||
|
||||
static auto start = std::chrono::steady_clock::now();
|
||||
|
||||
uint64_t Ion::Timing::millis() {
|
||||
namespace Ion {
|
||||
namespace Timing {
|
||||
|
||||
uint64_t millis() {
|
||||
auto elapsed = std::chrono::steady_clock::now() - start;
|
||||
return std::chrono::duration_cast<std::chrono::milliseconds>(elapsed).count();
|
||||
}
|
||||
|
||||
void msleep(uint32_t ms) {
|
||||
if (Simulator::Window::isHeadless()) {
|
||||
return;
|
||||
}
|
||||
SDL_Delay(ms);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
#include <ion/timing.h>
|
||||
#include "window.h"
|
||||
#include <SDL.h>
|
||||
|
||||
void Ion::Timing::msleep(uint32_t ms) {
|
||||
if (Ion::Simulator::Window::isHeadless()) {
|
||||
return;
|
||||
}
|
||||
SDL_Delay(ms);
|
||||
}
|
||||
Reference in New Issue
Block a user