Create tcp server

This commit is contained in:
2024-12-30 21:55:30 -05:00
parent 1a54c2e6fc
commit 47a05968fb
9 changed files with 355 additions and 1 deletions
+6 -1
View File
@@ -18,7 +18,7 @@ use crate::{
emulator::{EmulatorClient, EmulatorCommand, SimId},
input::MappingProvider,
persistence::Persistence,
window::{AboutWindow, AppWindow, GameWindow, InputWindow},
window::{AboutWindow, AppWindow, GameWindow, GdbServerWindow, InputWindow},
};
fn load_icon() -> anyhow::Result<IconData> {
@@ -183,6 +183,10 @@ impl ApplicationHandler<UserEvent> for Application {
let about = AboutWindow;
self.open(event_loop, Box::new(about));
}
UserEvent::OpenDebugger(sim_id) => {
let debugger = GdbServerWindow::new(sim_id, self.client.clone());
self.open(event_loop, Box::new(debugger));
}
UserEvent::OpenInput => {
let input = InputWindow::new(self.mappings.clone());
self.open(event_loop, Box::new(input));
@@ -374,6 +378,7 @@ impl Drop for Viewport {
pub enum UserEvent {
GamepadEvent(gilrs::Event),
OpenAbout,
OpenDebugger(SimId),
OpenInput,
OpenPlayer2,
}