Skip to content

Commit

Permalink
Fixed amiga topaz font.
Browse files Browse the repository at this point in the history
Seems 2 is used instead of 1 by syncterm.

Fixes mkrueger/icy_term#78
  • Loading branch information
mkrueger committed Apr 27, 2024
1 parent 1877584 commit 9f84b56
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 26 deletions.
4 changes: 2 additions & 2 deletions crates/icy_engine/src/fonts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -469,9 +469,9 @@ fonts![
(AMIGA_P0T_NOODLE, "Amiga/P0T-NOoDLE.psf", "P0T NOoDLE (Amiga)", 8, 16, 37),
(AMIGA_MOSOUL, "Amiga/mOsOul.psf", "mO'sOul (Amiga)", 8, 16, 38),
(AMIGA_MICROKNIGHTP, "Amiga/MicroKnight+.psf", "MicroKnight Plus (Amiga)", 8, 16, 39),
(AMIGA_TOPAZ_1P, "Amiga/Topaz1+.psf", "Topaz Plus (Amiga)", 8, 16, 40),
(AMIGA_TOPAZ_2P, "Amiga/Topaz2+.psf", "Topaz Plus (Amiga)", 8, 16, 40),
(AMIGA_MICROKNIGHT, "Amiga/MicroKnight.psf", "MicroKnight (Amiga)", 8, 16, 41),
(AMIGA_TOPAZ_1, "Amiga/Topaz1.psf", "Topaz (Amiga)", 8, 16, 42),
(AMIGA_TOPAZ_2, "Amiga/Topaz2.psf", "Topaz (Amiga)", 8, 16, 42),
(VIEWDATA, "Viewdata/saa5050.psf", "Viewdata", 6, 16),
];

Expand Down
5 changes: 1 addition & 4 deletions crates/icy_engine/src/parsers/mod.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
use crate::{EngineResult, Line, Size, TextPane};
use std::{
backtrace::Backtrace,
cmp::{max, min},
};
use std::cmp::{max, min};

use self::{ansi::sound::AnsiMusic, rip::bgi::MouseField};

Expand Down
3 changes: 2 additions & 1 deletion crates/icy_term/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ license.workspace = true
repository = "https://github.com/mkrueger/icy_tools"

[dependencies]
icy_net = { git ="https://github.com/mkrueger/icy_board" }
# icy_net = { git ="https://github.com/mkrueger/icy_board" }
icy_net = { path ="../../../icy_board/crates/icy_net" }

egui = { workspace = true }
eframe = { workspace = true }
Expand Down
18 changes: 0 additions & 18 deletions crates/icy_term/src/ui/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,24 +146,6 @@ impl MainWindow {

view
}

fn get_connection_back(&mut self) {
/*
if let Some(fts) = &mut self.current_file_transfer {
if let Some(handle) = fts.join_handle.take() {
if let Ok(join) = handle.join() {
self.buffer_update_thread.lock().connection = Arc::new(Mutex::new(Some(join)));
self.set_mode(MainWindowMode::ShowTerminal);
} else {
panic!("Error joining file transfer thread.");
}
} else {
panic!("Error joining file transfer thread - no join handle.");
}
} else {
panic!("Error joining file transfer thread - no current file transfer.");
}*/
}
}

#[cfg(not(target_arch = "wasm32"))]
Expand Down
2 changes: 2 additions & 0 deletions crates/icy_term/src/ui/buffer_update_thread.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use crate::{
Res, TerminalResult,
};
use egui::mutex::Mutex;
use glow::CW;
use icy_engine::{
ansi::{self, MusicOption},
rip::bgi::MouseField,
Expand Down Expand Up @@ -147,6 +148,7 @@ impl BufferUpdateThread {
if let Err(r) = r {
log::error!("callbackaction::SendString: {r}");
}
connection.com.flush();
}
icy_engine::CallbackAction::PlayMusic(music) => {
let r = self.sound_thread.lock().play_music(music);
Expand Down
2 changes: 2 additions & 0 deletions crates/icy_term/src/ui/dialogs/capture_dialog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,11 @@ impl DialogState {
}
Some(Message::StopCapture) => {
self.capture_session = false;
return false;
}
Some(Message::StartCapture) => {
self.capture_session = true;
return false;
}
Some(Message::CloseDialog) => {
return false;
Expand Down
7 changes: 6 additions & 1 deletion crates/icy_term/src/ui/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,10 @@ impl MainWindow {

let data = OpenConnectionData::from(&cloned_addr, timeout, window_size, Some(self.get_options().modem.clone()));

if let Some(_handle) = self.update_thread_handle.take() {
let _ = self.tx.send(SendData::Disconnect);
}

let (update_thread_handle, tx, rx) = crate::ui::buffer_update_thread::start_update_thread(ctx, data, self.buffer_update_thread.clone());

self.update_thread_handle = Some(update_thread_handle);
Expand Down Expand Up @@ -339,7 +343,8 @@ impl MainWindow {
}

pub fn hangup(&mut self) {
self.tx.send(SendData::Disconnect);
let _ = self.tx.send(SendData::Disconnect);
self.update_thread_handle = None;
self.buffer_update_thread.lock().sound_thread.lock().clear();
self.set_mode(MainWindowMode::ShowDialingDirectory);
}
Expand Down

0 comments on commit 9f84b56

Please sign in to comment.