Skip to content

Commit

Permalink
Merge branch 'master'
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkwhoffmann committed Nov 17, 2024
2 parents f817b85 + b1da479 commit bde68a0
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 23 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
9 changes: 6 additions & 3 deletions Emulator/Components/CIA/CIA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,12 @@ CIA::cacheStats(CIAStats &result) const
{
{ SYNCHRONIZED

result.idleSince = idleSince();
result.idleTotal = idleTotal() + result.idleSince;
result.idlePercentage = clock ? (double)result.idleTotal / (double)clock : 100.0;
auto idle = idleSince();
auto total = idleTotal() + idle;

result.idleSince = idle;
result.idleTotal = total;
result.idlePercentage = clock ? double(total) / double(clock + idle) : 100.0;
}
}

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
2 changes: 1 addition & 1 deletion Emulator/Peripherals/Drive/HardDrive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@ HardDrive::write(isize offset, isize length, u32 addr)
wtStream[objid].write((char *)(data.ptr + offset), length);
}

setFlag(FLAG_PROTECTED, true);
setFlag(FLAG_MODIFIED, true);
}

// Inform the GUI
Expand Down
4 changes: 2 additions & 2 deletions Emulator/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
#define VER_MAJOR 3
#define VER_MINOR 0
#define VER_SUBMINOR 0
#define VER_BETA 1
#define VER_BETA 2

// Snapshot version number
#define SNP_MAJOR 3
#define SNP_MINOR 0
#define SNP_SUBMINOR 0
#define SNP_BETA 1
#define SNP_BETA 2

// Uncomment this setting in a release build
// #define RELEASEBUILD
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
8 changes: 4 additions & 4 deletions vAmiga.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2868,7 +2868,7 @@
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 240915;
CURRENT_PROJECT_VERSION = 240920;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = "";
ENABLE_APP_SANDBOX = NO;
Expand All @@ -2889,7 +2889,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
MARKETING_VERSION = 3.0b1;
MARKETING_VERSION = 3.0b2;
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 c++20";
PRODUCT_BUNDLE_IDENTIFIER = dirkwhoffmann.vAmiga;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -2919,7 +2919,7 @@
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 240915;
CURRENT_PROJECT_VERSION = 240920;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = "";
ENABLE_APP_SANDBOX = NO;
Expand All @@ -2938,7 +2938,7 @@
);
LLVM_LTO = YES_THIN;
MACOSX_DEPLOYMENT_TARGET = 11.0;
MARKETING_VERSION = 3.0b1;
MARKETING_VERSION = 3.0b2;
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 c++20";
PRODUCT_BUNDLE_IDENTIFIER = dirkwhoffmann.vAmiga;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down

0 comments on commit bde68a0

Please sign in to comment.