Cocoa Port: Silence some compiler warnings.
This commit is contained in:
parent
a7bdd1e3a9
commit
d9be9c6bf6
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright (C) 2018 DeSmuME team
|
||||
Copyright (C) 2018-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
|
||||
|
@ -134,7 +134,7 @@ void ClientAVCaptureFileStream::InitBaseProperties(const AVFileTypeID fileTypeID
|
|||
|
||||
this->_expectedMaxFrameSize = videoFrameSize + audioFrameSize;
|
||||
|
||||
_semQueue = ssem_new(pendingFrameCount);
|
||||
_semQueue = ssem_new((int)pendingFrameCount);
|
||||
}
|
||||
|
||||
AVFileTypeVideoCodecID ClientAVCaptureFileStream::GetVideoCodecID()
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright (C) 2013-2022 DeSmuME team
|
||||
Copyright (C) 2013-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
|
||||
|
@ -381,7 +381,7 @@ GPU3DInterface *core3DList[GPU_3D_RENDERER_COUNT+1] = {
|
|||
#endif
|
||||
|
||||
gpuEvent->ApplyRender3DSettingsLock();
|
||||
GPU->Set3DRendererByID(rendererID);
|
||||
GPU->Set3DRendererByID((int)rendererID);
|
||||
gpuEvent->ApplyRender3DSettingsUnlock();
|
||||
}
|
||||
|
||||
|
@ -484,7 +484,7 @@ GPU3DInterface *core3DList[GPU_3D_RENDERER_COUNT+1] = {
|
|||
|
||||
gpuEvent->ApplyRender3DSettingsLock();
|
||||
|
||||
CommonSettings.num_cores = numberCores;
|
||||
CommonSettings.num_cores = (int)numberCores;
|
||||
|
||||
if (renderingEngineID == RENDERID_SOFTRASTERIZER)
|
||||
{
|
||||
|
@ -1871,7 +1871,7 @@ bool OSXOpenGLRendererFramebufferDidResize(const bool isFBOSupported, size_t w,
|
|||
|
||||
// Create a PBuffer if FBOs are not supported.
|
||||
SILENCE_DEPRECATION_MACOS_10_7( CGLPBufferObj newPBuffer = NULL );
|
||||
SILENCE_DEPRECATION_MACOS_10_7( CGLError error = CGLCreatePBuffer(w, h, GL_TEXTURE_2D, GL_RGBA, 0, &newPBuffer) );
|
||||
SILENCE_DEPRECATION_MACOS_10_7( CGLError error = CGLCreatePBuffer((GLsizei)w, (GLsizei)h, GL_TEXTURE_2D, GL_RGBA, 0, &newPBuffer) );
|
||||
|
||||
if ( (newPBuffer == NULL) || (error != kCGLNoError) )
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Copyright (C) 2011 Roger Manuel
|
||||
Copyright (C) 2011-2022 DeSmuME team
|
||||
Copyright (C) 2011-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
|
||||
|
@ -603,7 +603,7 @@ volatile bool execute = true;
|
|||
execControl->SetExecutionBehavior((ExecutionBehavior)coreState);
|
||||
pthread_rwlock_rdlock(&threadParam.rwlockOutputList);
|
||||
|
||||
char frameStatusCStr[128] = {0};
|
||||
char frameStatusCStr[64] = {0};
|
||||
|
||||
switch ((ExecutionBehavior)coreState)
|
||||
{
|
||||
|
@ -614,7 +614,7 @@ volatile bool execute = true;
|
|||
[cdsOutput setIdle:YES];
|
||||
}
|
||||
|
||||
sprintf(frameStatusCStr, "%llu", (unsigned long long)[self frameNumber]);
|
||||
snprintf(frameStatusCStr, sizeof(frameStatusCStr), "%llu", (unsigned long long)[self frameNumber]);
|
||||
|
||||
[_fpsTimer invalidate];
|
||||
_fpsTimer = nil;
|
||||
|
@ -628,7 +628,7 @@ volatile bool execute = true;
|
|||
[cdsOutput setIdle:NO];
|
||||
}
|
||||
|
||||
sprintf(frameStatusCStr, "%llu", (unsigned long long)[self frameNumber]);
|
||||
snprintf(frameStatusCStr, sizeof(frameStatusCStr), "%llu", (unsigned long long)[self frameNumber]);
|
||||
|
||||
[_fpsTimer invalidate];
|
||||
_fpsTimer = nil;
|
||||
|
@ -642,7 +642,7 @@ volatile bool execute = true;
|
|||
[cdsOutput setIdle:NO];
|
||||
}
|
||||
|
||||
sprintf(frameStatusCStr, "%s", "Executing...");
|
||||
snprintf(frameStatusCStr, sizeof(frameStatusCStr), "%s", "Executing...");
|
||||
|
||||
if (_fpsTimer == nil)
|
||||
{
|
||||
|
@ -668,7 +668,7 @@ volatile bool execute = true;
|
|||
}
|
||||
}
|
||||
|
||||
sprintf(frameStatusCStr, "Jumping to frame %llu.", (unsigned long long)execControl->GetFrameJumpTarget());
|
||||
snprintf(frameStatusCStr, sizeof(frameStatusCStr), "Jumping to frame %llu.", (unsigned long long)execControl->GetFrameJumpTarget());
|
||||
|
||||
[_fpsTimer invalidate];
|
||||
_fpsTimer = nil;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Copyright (C) 2011 Roger Manuel
|
||||
Copyright (C) 2011-2022 DeSmuME team
|
||||
Copyright (C) 2011-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
|
||||
|
@ -295,7 +295,7 @@
|
|||
|
||||
if (methodID != SNDCORE_DUMMY)
|
||||
{
|
||||
result = SPU_ChangeSoundCore(methodID, (int)SPU_BUFFER_BYTES);
|
||||
result = SPU_ChangeSoundCore((int)methodID, (int)SPU_BUFFER_BYTES);
|
||||
}
|
||||
|
||||
if(result == -1)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright (C) 2013-2022 DeSmuME team
|
||||
Copyright (C) 2013-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
|
||||
|
@ -494,13 +494,13 @@ static std::unordered_map<NSScreen *, DisplayWindowController *> _screenMap; //
|
|||
[[self view] setIsHUDRealTimeClockVisible:[[NSUserDefaults standardUserDefaults] boolForKey:@"HUD_ShowRTC"]];
|
||||
[[self view] setIsHUDInputVisible:[[NSUserDefaults standardUserDefaults] boolForKey:@"HUD_ShowInput"]];
|
||||
|
||||
[[self view] setHudColorExecutionSpeed:[CocoaDSUtil NSColorFromRGBA8888:LE_TO_LOCAL_32([[NSUserDefaults standardUserDefaults] integerForKey:@"HUD_Color_ExecutionSpeed"])]];
|
||||
[[self view] setHudColorVideoFPS:[CocoaDSUtil NSColorFromRGBA8888:LE_TO_LOCAL_32([[NSUserDefaults standardUserDefaults] integerForKey:@"HUD_Color_VideoFPS"])]];
|
||||
[[self view] setHudColorRender3DFPS:[CocoaDSUtil NSColorFromRGBA8888:LE_TO_LOCAL_32([[NSUserDefaults standardUserDefaults] integerForKey:@"HUD_Color_Render3DFPS"])]];
|
||||
[[self view] setHudColorFrameIndex:[CocoaDSUtil NSColorFromRGBA8888:LE_TO_LOCAL_32([[NSUserDefaults standardUserDefaults] integerForKey:@"HUD_Color_FrameIndex"])]];
|
||||
[[self view] setHudColorLagFrameCount:[CocoaDSUtil NSColorFromRGBA8888:LE_TO_LOCAL_32([[NSUserDefaults standardUserDefaults] integerForKey:@"HUD_Color_LagFrameCount"])]];
|
||||
[[self view] setHudColorCPULoadAverage:[CocoaDSUtil NSColorFromRGBA8888:LE_TO_LOCAL_32([[NSUserDefaults standardUserDefaults] integerForKey:@"HUD_Color_CPULoadAverage"])]];
|
||||
[[self view] setHudColorRTC:[CocoaDSUtil NSColorFromRGBA8888:LE_TO_LOCAL_32([[NSUserDefaults standardUserDefaults] integerForKey:@"HUD_Color_RTC"])]];
|
||||
[[self view] setHudColorExecutionSpeed:[CocoaDSUtil NSColorFromRGBA8888:LE_TO_LOCAL_32((uint32_t)[[NSUserDefaults standardUserDefaults] integerForKey:@"HUD_Color_ExecutionSpeed"])]];
|
||||
[[self view] setHudColorVideoFPS:[CocoaDSUtil NSColorFromRGBA8888:LE_TO_LOCAL_32((uint32_t)[[NSUserDefaults standardUserDefaults] integerForKey:@"HUD_Color_VideoFPS"])]];
|
||||
[[self view] setHudColorRender3DFPS:[CocoaDSUtil NSColorFromRGBA8888:LE_TO_LOCAL_32((uint32_t)[[NSUserDefaults standardUserDefaults] integerForKey:@"HUD_Color_Render3DFPS"])]];
|
||||
[[self view] setHudColorFrameIndex:[CocoaDSUtil NSColorFromRGBA8888:LE_TO_LOCAL_32((uint32_t)[[NSUserDefaults standardUserDefaults] integerForKey:@"HUD_Color_FrameIndex"])]];
|
||||
[[self view] setHudColorLagFrameCount:[CocoaDSUtil NSColorFromRGBA8888:LE_TO_LOCAL_32((uint32_t)[[NSUserDefaults standardUserDefaults] integerForKey:@"HUD_Color_LagFrameCount"])]];
|
||||
[[self view] setHudColorCPULoadAverage:[CocoaDSUtil NSColorFromRGBA8888:LE_TO_LOCAL_32((uint32_t)[[NSUserDefaults standardUserDefaults] integerForKey:@"HUD_Color_CPULoadAverage"])]];
|
||||
[[self view] setHudColorRTC:[CocoaDSUtil NSColorFromRGBA8888:LE_TO_LOCAL_32((uint32_t)[[NSUserDefaults standardUserDefaults] integerForKey:@"HUD_Color_RTC"])]];
|
||||
}
|
||||
|
||||
- (BOOL) masterStatusBarState
|
||||
|
@ -1141,7 +1141,7 @@ static std::unordered_map<NSScreen *, DisplayWindowController *> _screenMap; //
|
|||
|
||||
bool isSupportingCPU = false;
|
||||
bool isSupportingShader = false;
|
||||
OGLFilter::GetSupport([theItem tag], &isSupportingCPU, &isSupportingShader);
|
||||
OGLFilter::GetSupport((int)[theItem tag], &isSupportingCPU, &isSupportingShader);
|
||||
|
||||
enable = isSupportingCPU || (isSupportingShader && [[self view] canUseShaderBasedFilters]);
|
||||
}
|
||||
|
|
|
@ -1022,7 +1022,7 @@
|
|||
{
|
||||
[panel beginSheetModalForWindow:slot1ManagerWindow
|
||||
completionHandler:^(NSInteger result) {
|
||||
[self didEndChooseSlot1R4Directory:panel returnCode:result contextInfo:nil];
|
||||
[self didEndChooseSlot1R4Directory:panel returnCode:(int)result contextInfo:nil];
|
||||
} ];
|
||||
}
|
||||
else
|
||||
|
@ -3172,7 +3172,7 @@
|
|||
{
|
||||
if ([(id)theItem isMemberOfClass:[NSMenuItem class]])
|
||||
{
|
||||
[(NSMenuItem*)theItem setState:([[cdsCore cdsGPU] gpuStateByBit:[theItem tag]]) ? GUI_STATE_ON : GUI_STATE_OFF];
|
||||
[(NSMenuItem*)theItem setState:([[cdsCore cdsGPU] gpuStateByBit:(UInt32)[theItem tag]]) ? GUI_STATE_ON : GUI_STATE_OFF];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright (C) 2018-2022 DeSmuME team
|
||||
Copyright (C) 2018-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
|
||||
|
@ -87,7 +87,7 @@
|
|||
{
|
||||
[panel beginSheetModalForWindow:[self window]
|
||||
completionHandler:^(NSInteger result) {
|
||||
[self chooseDirectoryPathDidEnd:panel returnCode:result contextInfo:nil];
|
||||
[self chooseDirectoryPathDidEnd:panel returnCode:(int)result contextInfo:nil];
|
||||
} ];
|
||||
}
|
||||
else
|
||||
|
|
|
@ -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
|
||||
|
@ -179,7 +179,7 @@
|
|||
{
|
||||
CGLContextObj prevContext = CGLGetCurrentContext();
|
||||
CGLSetCurrentContext(cglDisplayContext);
|
||||
oglImage->SetPixelScalerOGL(scalerID);
|
||||
oglImage->SetPixelScalerOGL((int)scalerID);
|
||||
oglImage->ProcessOGL();
|
||||
CGLSetCurrentContext(prevContext);
|
||||
}
|
||||
|
@ -193,7 +193,7 @@
|
|||
{
|
||||
CGLContextObj prevContext = CGLGetCurrentContext();
|
||||
CGLSetCurrentContext(cglDisplayContext);
|
||||
oglImage->SetOutputFilterOGL(outputFilterID);
|
||||
oglImage->SetOutputFilterOGL((int)outputFilterID);
|
||||
CGLSetCurrentContext(prevContext);
|
||||
}
|
||||
|
||||
|
@ -235,7 +235,7 @@
|
|||
// Send the NSImage to OpenGL.
|
||||
CGLContextObj prevContext = CGLGetCurrentContext();
|
||||
CGLSetCurrentContext(cglDisplayContext);
|
||||
oglImage->LoadFrameOGL(bitmapData, 0, 0, previewWidth, previewHeight);
|
||||
oglImage->LoadFrameOGL(bitmapData, 0, 0, (GLsizei)previewWidth, (GLsizei)previewHeight);
|
||||
oglImage->ProcessOGL();
|
||||
CGLSetCurrentContext(prevContext);
|
||||
}
|
||||
|
@ -426,7 +426,7 @@
|
|||
[panel setAllowedFileTypes:fileTypes];
|
||||
[panel beginSheetModalForWindow:window
|
||||
completionHandler:^(NSInteger result) {
|
||||
[self chooseRomForAutoloadDidEnd:panel returnCode:result contextInfo:nil];
|
||||
[self chooseRomForAutoloadDidEnd:panel returnCode:(int)result contextInfo:nil];
|
||||
} ];
|
||||
}
|
||||
else
|
||||
|
@ -487,7 +487,7 @@
|
|||
[panel setAllowedFileTypes:fileTypes];
|
||||
[panel beginSheetModalForWindow:window
|
||||
completionHandler:^(NSInteger result) {
|
||||
[self chooseAdvansceneDatabaseDidEnd:panel returnCode:result contextInfo:nil];
|
||||
[self chooseAdvansceneDatabaseDidEnd:panel returnCode:(int)result contextInfo:nil];
|
||||
} ];
|
||||
}
|
||||
else
|
||||
|
@ -542,7 +542,7 @@
|
|||
[panel setAllowedFileTypes:fileTypes];
|
||||
[panel beginSheetModalForWindow:window
|
||||
completionHandler:^(NSInteger result) {
|
||||
[self chooseCheatDatabaseDidEnd:panel returnCode:result contextInfo:nil];
|
||||
[self chooseCheatDatabaseDidEnd:panel returnCode:(int)result contextInfo:nil];
|
||||
} ];
|
||||
}
|
||||
else
|
||||
|
@ -590,8 +590,8 @@
|
|||
{
|
||||
[cheatDatabaseController setContent:dbList];
|
||||
|
||||
NSString *titleString = cdsCheats.dbTitle;
|
||||
NSString *dateString = cdsCheats.dbDate;
|
||||
NSString *titleString = [cdsCheats dbTitle];
|
||||
NSString *dateString = [cdsCheats dbDate];
|
||||
|
||||
[cheatWindowBindings setValue:titleString forKey:@"cheatDBTitle"];
|
||||
[cheatWindowBindings setValue:dateString forKey:@"cheatDBDate"];
|
||||
|
@ -754,7 +754,7 @@
|
|||
[panel setAllowedFileTypes:fileTypes];
|
||||
[panel beginSheetModalForWindow:window
|
||||
completionHandler:^(NSInteger result) {
|
||||
[self chooseArm9BiosImageDidEnd:panel returnCode:result contextInfo:nil];
|
||||
[self chooseArm9BiosImageDidEnd:panel returnCode:(int)result contextInfo:nil];
|
||||
} ];
|
||||
}
|
||||
else
|
||||
|
@ -786,7 +786,7 @@
|
|||
[panel setAllowedFileTypes:fileTypes];
|
||||
[panel beginSheetModalForWindow:window
|
||||
completionHandler:^(NSInteger result) {
|
||||
[self chooseArm7BiosImageDidEnd:panel returnCode:result contextInfo:nil];
|
||||
[self chooseArm7BiosImageDidEnd:panel returnCode:(int)result contextInfo:nil];
|
||||
} ];
|
||||
}
|
||||
else
|
||||
|
@ -818,7 +818,7 @@
|
|||
[panel setAllowedFileTypes:fileTypes];
|
||||
[panel beginSheetModalForWindow:window
|
||||
completionHandler:^(NSInteger result) {
|
||||
[self chooseFirmwareImageDidEnd:panel returnCode:result contextInfo:nil];
|
||||
[self chooseFirmwareImageDidEnd:panel returnCode:(int)result contextInfo:nil];
|
||||
} ];
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue