mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-08-10 20:04:16 +02:00
Update to v106r33 release.
byuu says: Changelog: - nall/GNUmakefile: added `openmp=(true,false)` option; can be toggled when building higan/bsnes - defaults to disabled on macOS, because Xcode doesn't stupidly doesn't ship with support for it - higan/GNUmakefile: forgot to switch target,profile back from bsnes,fast to higan,accurate - this is just gonna happen from time to time, sorry - sfc/dsp: when using the fast profile, the DSP syncs per sample instead of per clock - should only negatively impact Koushien 2, but is a fairly significant speedup otherwise - sfc/ppc,ppu-fast: optimized the code a bit (ppu 130fps to 133fps) - sfc/ppu-fast: basic vertical mosaic support (not accurate, but should look okay hopefully) - sfc/ppu-fast: added missing mode7 hflip support - sfc/ppu-fast: added support to render at 256-width and/or 240-height - gives a decent speed boost, and also allows all of the older quark shaders to work nicely again - it does violate the contract of Emulator::Interface, but oh well, it works fine in the bsnes GUI - sfc/ppu-fast: use cached CGRAM values for mode7 and sprites - sfc/ppu-fast: use global range/time over flags in object rendering - may not actually work as we intended since it's a race condition even if it's only ORing the flags - really don't want to have to make those variables atomic if I don't have to - sfc/ppu-fast: should fully support interlace and overscan modes now - hiro/cocoa: updated macOS Gatekeeper disable support to work on 10.13+ - ruby: forgot to fix macOS input driver, sorry - nall/GNUmakefile: if uname is present, then just default to rm instead of del (fixes Msys) Note: blur emulation option will break pretty badly in 256x240 output mode. I'll fix it later.
This commit is contained in:
@@ -38,11 +38,11 @@
|
||||
[item setTarget:self];
|
||||
[rootMenu addItem:item];
|
||||
|
||||
string result = nall::execute("defaults", "read", "/Library/Preferences/com.apple.security", "GKAutoRearm").output.strip();
|
||||
if(result != "0") {
|
||||
disableGatekeeperAutoRearm = [[[NSMenuItem alloc] initWithTitle:@"Disable Gatekeeper Auto-Rearm" action:@selector(menuDisableGatekeeperAutoRearm) keyEquivalent:@""] autorelease];
|
||||
[disableGatekeeperAutoRearm setTarget:self];
|
||||
[rootMenu addItem:disableGatekeeperAutoRearm];
|
||||
string result = nall::execute("spctl", "--status").output.strip();
|
||||
if(result != "assessments disabled") {
|
||||
disableGatekeeper = [[[NSMenuItem alloc] initWithTitle:@"Disable Gatekeeper" action:@selector(menuDisableGatekeeper) keyEquivalent:@""] autorelease];
|
||||
[disableGatekeeper setTarget:self];
|
||||
[rootMenu addItem:disableGatekeeper];
|
||||
}
|
||||
|
||||
[rootMenu addItem:[NSMenuItem separatorItem]];
|
||||
@@ -139,18 +139,44 @@
|
||||
hiro::Application::Cocoa::doPreferences();
|
||||
}
|
||||
|
||||
-(void) menuDisableGatekeeperAutoRearm {
|
||||
//to hell with gatekeepers
|
||||
-(void) menuDisableGatekeeper {
|
||||
NSAlert* alert = [[[NSAlert alloc] init] autorelease];
|
||||
[alert setMessageText:@"Disable Gatekeeper Auto-Rearm"];
|
||||
[alert setMessageText:@"Disable Gatekeeper"];
|
||||
|
||||
nall::execute("sudo", "defaults", "write", "/Library/Preferences/com.apple.security", "GKAutoRearm", "-bool", "NO");
|
||||
if(nall::execute("defaults", "read", "/Library/Preferences/com.apple.security", "GKAutoRearm").output.strip() == "0") {
|
||||
AuthorizationRef authorization;
|
||||
OSStatus status = AuthorizationCreate(nullptr, kAuthorizationEmptyEnvironment, kAuthorizationFlagDefaults, &authorization);
|
||||
if(status == errAuthorizationSuccess) {
|
||||
AuthorizationItem items = {kAuthorizationRightExecute, 0, nullptr, 0};
|
||||
AuthorizationRights rights = {1, &items};
|
||||
status = AuthorizationCopyRights(authorization, &rights, nullptr,
|
||||
kAuthorizationFlagDefaults
|
||||
| kAuthorizationFlagInteractionAllowed
|
||||
| kAuthorizationFlagPreAuthorize
|
||||
| kAuthorizationFlagExtendRights, nullptr);
|
||||
if(status == errAuthorizationSuccess) {
|
||||
{ char program[] = "/usr/sbin/spctl";
|
||||
char arguments[] = {"--master-disable", nullptr};
|
||||
FILE* pipe = nullptr;
|
||||
AuthorizationExecuteWithPrivileges(authorization, program, kAuthorizationFlagDefaults, arguments, &pipe);
|
||||
}
|
||||
{ char program[] = "/usr/bin/defaults";
|
||||
char arguments[] = {"write /Library/Preferences/com.apple.security GKAutoRearm -bool NO"};
|
||||
FILE* pipe = nullptr;
|
||||
AuthorizationExecuteWithPrivileges(authorization, program, kAuthorizationFlagDefaults, arguments, &pipe);
|
||||
}
|
||||
}
|
||||
AuthorizationFree(authorization, kAuthorizationFlagDefaults);
|
||||
}
|
||||
|
||||
string result = nall::execute("spctl", "--status").output.strip();
|
||||
if(result == "assessments disabled") {
|
||||
[alert setAlertStyle:NSInformationalAlertStyle];
|
||||
[alert setInformativeText:@"Gatekeeper's automatic 30-day rearm behavior has been disabled successfully."];
|
||||
[disableGatekeeperAutoRearm setHidden:YES];
|
||||
[alert setInformativeText:@"Gatekeeper has been successfully disabled."];
|
||||
[disableGatekeeper setHidden:YES];
|
||||
} else {
|
||||
[alert setAlertStyle:NSWarningAlertStyle];
|
||||
[alert setInformativeText:@"Error: failed to disable Gatekeeper's automatic rearm behavior."];
|
||||
[alert setInformativeText:@"Error: failed to disable Gatekeeper."];
|
||||
}
|
||||
|
||||
[alert addButtonWithTitle:@"Ok"];
|
||||
|
Reference in New Issue
Block a user