mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-17 07:18:04 +08:00
Add self hosted runner to ci.yml (#955)
* Add self hosted runner to ci.yml * Remove libgtk install * Use mold as the linker * Make build logs non verbose * Fix crash on failure to get GLOBAL_PLATFORM * Copy the platform enum before calling unwrap_or_default Co-authored-by: 0hypercube <0hypercube@gmail.com>
This commit is contained in:
committed by
Keavon Chambers
parent
dcc3eadf44
commit
f67fbe8899
@@ -141,7 +141,7 @@ impl Dispatcher {
|
||||
.process_message(message, (&self.message_handlers.input_preprocessor_message_handler, actions), &mut queue);
|
||||
}
|
||||
InputPreprocessor(message) => {
|
||||
let keyboard_platform = GLOBAL_PLATFORM.get().expect("Failed to get GLOBAL_PLATFORM").as_keyboard_platform_layout();
|
||||
let keyboard_platform = GLOBAL_PLATFORM.get().copied().unwrap_or_default().as_keyboard_platform_layout();
|
||||
|
||||
self.message_handlers.input_preprocessor_message_handler.process_message(message, keyboard_platform, &mut queue);
|
||||
}
|
||||
|
||||
@@ -224,7 +224,7 @@ impl fmt::Display for Key {
|
||||
return write!(f, "{}", key_name.chars().skip(KEY_PREFIX.len()).collect::<String>());
|
||||
}
|
||||
|
||||
let keyboard_layout = || GLOBAL_PLATFORM.get().expect("Failed to get GLOBAL_PLATFORM").as_keyboard_platform_layout();
|
||||
let keyboard_layout = || GLOBAL_PLATFORM.get().copied().unwrap_or_default().as_keyboard_platform_layout();
|
||||
|
||||
let name = match self {
|
||||
// Writing system keys
|
||||
@@ -338,7 +338,7 @@ impl fmt::Display for KeysGroup {
|
||||
.0
|
||||
.iter()
|
||||
.map(|key| {
|
||||
let keyboard_layout = GLOBAL_PLATFORM.get().expect("Failed to get GLOBAL_PLATFORM").as_keyboard_platform_layout();
|
||||
let keyboard_layout = GLOBAL_PLATFORM.get().copied().unwrap_or_default().as_keyboard_platform_layout();
|
||||
let key_is_modifier = matches!(*key, Key::Control | Key::Command | Key::Alt | Key::Shift | Key::Meta | Key::Accel);
|
||||
|
||||
if keyboard_layout == KeyboardPlatformLayout::Mac && key_is_modifier {
|
||||
|
||||
Reference in New Issue
Block a user