diff --git a/desmume/src/MMU.cpp b/desmume/src/MMU.cpp index 5074ebd2e..840ff9151 100644 --- a/desmume/src/MMU.cpp +++ b/desmume/src/MMU.cpp @@ -1102,15 +1102,15 @@ static void execdiv() { // when the result is 32bits, the upper 32bits of the sign-extended result are inverted if (mode == 0) - res ^= 0xFFFFFFFF00000000; + res ^= 0xFFFFFFFF00000000LL; // the DIV0 flag in DIVCNT is set only if the full 64bit DIV_DENOM value is zero, even in 32bit mode if ((u64)T1ReadQuad(MMU.ARM9_REG, 0x298) == 0) MMU_new.div.div0 = 1; } - else if((mode != 0) && (num == 0x8000000000000000) && (den == -1)) + else if((mode != 0) && (num == 0x8000000000000000LL) && (den == -1)) { - res = 0x8000000000000000; + res = 0x8000000000000000LL; mod = 0; } else if((mode == 0) && (num == (s64) (s32) 0x80000000) && (den == -1)) diff --git a/desmume/src/frontend/cocoa/userinterface/MacMetalDisplayView.mm b/desmume/src/frontend/cocoa/userinterface/MacMetalDisplayView.mm index 8f8c7498e..e83459aff 100644 --- a/desmume/src/frontend/cocoa/userinterface/MacMetalDisplayView.mm +++ b/desmume/src/frontend/cocoa/userinterface/MacMetalDisplayView.mm @@ -1,5 +1,5 @@ /* - Copyright (C) 2017-2022 DeSmuME team + Copyright (C) 2017-2023 DeSmuME team This file is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -79,21 +79,21 @@ [device retain]; NSString *tempVersionStr = @"Metal - Unknown GPU Family"; - const BOOL isRWTexSupported = [device supportsFeatureSet:10002]; // MTLFeatureSet_macOS_ReadWriteTextureTier2 + const BOOL isRWTexSupported = [device supportsFeatureSet:(MTLFeatureSet)10002]; // MTLFeatureSet_macOS_ReadWriteTextureTier2 - if ([device supportsFeatureSet:10005]) // MTLFeatureSet_macOS_GPUFamily2_v1 + if ([device supportsFeatureSet:(MTLFeatureSet)10005]) // MTLFeatureSet_macOS_GPUFamily2_v1 { tempVersionStr = @"macOS Metal GPUFamily2_v1"; } - else if ([device supportsFeatureSet:10004]) // MTLFeatureSet_macOS_GPUFamily1_v4 + else if ([device supportsFeatureSet:(MTLFeatureSet)10004]) // MTLFeatureSet_macOS_GPUFamily1_v4 { tempVersionStr = (isRWTexSupported) ? @"macOS Metal GPUFamily1_v4 w/ Tier2 R/W Textures" : @"macOS Metal GPUFamily1_v4"; } - else if ([device supportsFeatureSet:10003]) // MTLFeatureSet_macOS_GPUFamily1_v3 + else if ([device supportsFeatureSet:(MTLFeatureSet)10003]) // MTLFeatureSet_macOS_GPUFamily1_v3 { tempVersionStr = (isRWTexSupported) ? @"macOS Metal GPUFamily1_v3 w/ Tier2 R/W Textures" : @"macOS Metal GPUFamily1_v3"; } - else if ([device supportsFeatureSet:10001]) // MTLFeatureSet_macOS_GPUFamily1_v2 + else if ([device supportsFeatureSet:(MTLFeatureSet)10001]) // MTLFeatureSet_macOS_GPUFamily1_v2 { tempVersionStr = (isRWTexSupported) ? @"macOS Metal GPUFamily1_v2 w/ Tier2 R/W Textures" : @"macOS Metal GPUFamily1_v2"; }