Skip to content

Commit

Permalink
Reenabling EXE files, Fixed RetroShell shift bug, cleanup (#842)
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkwhoffmann committed Sep 20, 2024
1 parent 3cf4a33 commit f5c1d71
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
21 changes: 9 additions & 12 deletions Emulator/Base/Thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -356,29 +356,26 @@ void
Thread::changeStateTo(ExecState requestedState)
{
assertLaunched();

if (isEmulatorThread()) {

// Switch immediately
switchState(requestedState);
assert(state == requestedState);

} else {

// Remember the requested state
newState = requestedState;

// Request the change
assert(stateChangeRequest.test() == false);
stateChangeRequest.test_and_set();
assert(stateChangeRequest.test() == true);

if (!isEmulatorThread()) {

// Wait until the change has been performed
stateChangeRequest.wait(true);
assert(stateChangeRequest.test() == false);
}

// Wait until the change has been performed
stateChangeRequest.wait(true);
assert(stateChangeRequest.test() == false);
}
}

Expand Down
2 changes: 1 addition & 1 deletion Emulator/Peripherals/Drive/FloppyDrive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1114,7 +1114,7 @@ FloppyDrive::insertMediaFile(class MediaFile &file, bool wp)
{
try {

const ADFFile &adf = dynamic_cast<const ADFFile &>(file);
const FloppyFile &adf = dynamic_cast<const FloppyFile &>(file);
swapDisk(std::make_unique<FloppyDisk>(adf, wp));

} catch (...) {
Expand Down
3 changes: 3 additions & 0 deletions GUI/Peripherals/KeyboardController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ class KeyboardController: NSObject {

func flagsChanged(with event: NSEvent) {

// Intercept if the console is open
if renderer.console.isVisible { return }

// Check for a mouse controlling key combination
if parent.metal.checkForMouseKeys(with: event) { return }

Expand Down

0 comments on commit f5c1d71

Please sign in to comment.