From 5c805b2de079ffab195a3d8ab96c50e1c9242e96 Mon Sep 17 00:00:00 2001 From: rogerman Date: Wed, 14 Jun 2023 13:57:30 -0700 Subject: [PATCH] Cocoa Port: Fix some compiler warnings. --- desmume/src/frontend/cocoa/cocoa_firmware.mm | 4 ++-- desmume/src/frontend/cocoa/openemu/NDSGameCore.mm | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/desmume/src/frontend/cocoa/cocoa_firmware.mm b/desmume/src/frontend/cocoa/cocoa_firmware.mm index 5e787846a..cb0384d79 100644 --- a/desmume/src/frontend/cocoa/cocoa_firmware.mm +++ b/desmume/src/frontend/cocoa/cocoa_firmware.mm @@ -1,6 +1,6 @@ /* Copyright (C) 2011 Roger Manuel - Copyright (C) 2012-2022 DeSmuME team + Copyright (C) 2012-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 @@ -990,7 +990,7 @@ FirmwareConfigInterface::FirmwareConfigInterface() _internalData = (FirmwareConfig *)malloc(sizeof(FirmwareConfig)); NDS_GetDefaultFirmwareConfig(*_internalData); - srand(time(NULL)); + srand((uint32_t)time(NULL)); // Generate a random firmware MAC address and its associated string. const uint32_t defaultFirmwareMACAddressValue = (uint32_t)_internalData->MACAddress[2] | ((uint32_t)_internalData->MACAddress[3] << 8) | ((uint32_t)_internalData->MACAddress[4] << 16) | ((uint32_t)_internalData->MACAddress[5] << 24); diff --git a/desmume/src/frontend/cocoa/openemu/NDSGameCore.mm b/desmume/src/frontend/cocoa/openemu/NDSGameCore.mm index 19d4992d0..7f37f5341 100644 --- a/desmume/src/frontend/cocoa/openemu/NDSGameCore.mm +++ b/desmume/src/frontend/cocoa/openemu/NDSGameCore.mm @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2022 DeSmuME team + Copyright (C) 2012-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 @@ -509,7 +509,7 @@ void UpdateDisplayPropertiesFromStates(uint64_t displayModeStates, ClientDisplay // draw at 1x scaling, which starts looking uglier as the view size is increased. if (!_canRespondToViewResize) { - int legacyVersionScale = 1; + NSUInteger legacyVersionScale = 1; _OEViewSize.width = (int)(transformNormalWidth + 0.0005); _OEViewSize.height = (int)(transformNormalHeight + 0.0005); @@ -535,8 +535,8 @@ void UpdateDisplayPropertiesFromStates(uint64_t displayModeStates, ClientDisplay } // Multiply the normal size by our fixed scaling value. - _OEViewSize.width *= legacyVersionScale; - _OEViewSize.height *= legacyVersionScale; + _OEViewSize.width *= (int)legacyVersionScale; + _OEViewSize.height *= (int)legacyVersionScale; } apple_unfairlock_lock(unfairlockDisplayMode);