Skip to content

Commit

Permalink
Buildfix mac (name collision with NO...)
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Dec 13, 2023
1 parent 7aa6f3d commit e626144
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Core/ConfigValues.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ enum class DisplayFramerateMode : int {
};

enum class SkipGPUReadbackMode : int {
NO,
NO_SKIP,
SKIP,
COPY_TO_TEXTURE,
};
2 changes: 1 addition & 1 deletion Core/HLE/sceAtrac.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1629,7 +1629,7 @@ static u32 sceAtracGetNextSample(int atracID, u32 outNAddr) {
}
if (numSamples > atrac->SamplesPerFrame())
numSamples = atrac->SamplesPerFrame();
if (atrac->bufferState_ == ATRAC_STATUS_STREAMED_LOOP_FROM_END && numSamples + atrac->currentSample_ > atrac->endSample_) {
if (atrac->bufferState_ == ATRAC_STATUS_STREAMED_LOOP_FROM_END && (int)numSamples + atrac->currentSample_ > atrac->endSample_) {
atrac->bufferState_ = ATRAC_STATUS_ALL_DATA_LOADED;
}
if (Memory::IsValidAddress(outNAddr))
Expand Down
8 changes: 4 additions & 4 deletions GPU/Common/FramebufferManagerCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,7 @@ void FramebufferManagerCommon::DownloadFramebufferOnSwitch(VirtualFramebuffer *v
// Saving each frame would be slow.

// TODO: This type of download could be made async, for less stutter on framebuffer creation.
if (g_Config.iSkipGPUReadbackMode == (int)SkipGPUReadbackMode::NO && !PSP_CoreParameter().compat.flags().DisableFirstFrameReadback) {
if (g_Config.iSkipGPUReadbackMode == (int)SkipGPUReadbackMode::NO_SKIP && !PSP_CoreParameter().compat.flags().DisableFirstFrameReadback) {
ReadFramebufferToMemory(vfb, 0, 0, vfb->safeWidth, vfb->safeHeight, RASTER_COLOR, Draw::ReadbackMode::BLOCK);
vfb->usageFlags = (vfb->usageFlags | FB_USAGE_DOWNLOAD | FB_USAGE_FIRST_FRAME_SAVED) & ~FB_USAGE_DOWNLOAD_CLEAR;
vfb->safeWidth = 0;
Expand All @@ -1040,7 +1040,7 @@ bool FramebufferManagerCommon::ShouldDownloadFramebufferColor(const VirtualFrame

bool FramebufferManagerCommon::ShouldDownloadFramebufferDepth(const VirtualFramebuffer *vfb) const {
// Download depth buffer for Syphon Filter lens flares
if (!PSP_CoreParameter().compat.flags().ReadbackDepth || g_Config.iSkipGPUReadbackMode != (int)SkipGPUReadbackMode::NO) {
if (!PSP_CoreParameter().compat.flags().ReadbackDepth || g_Config.iSkipGPUReadbackMode != (int)SkipGPUReadbackMode::NO_SKIP) {
return false;
}
return (vfb->usageFlags & FB_USAGE_RENDER_DEPTH) != 0 && vfb->width >= 480 && vfb->height >= 272;
Expand Down Expand Up @@ -2130,7 +2130,7 @@ bool FramebufferManagerCommon::NotifyFramebufferCopy(u32 src, u32 dst, int size,
// Again we have the problem though that it's doing a lot of small copies here, one for each line.
if (srcH == 0 || srcY + srcH > srcBuffer->bufferHeight) {
WARN_LOG_ONCE(btdcpyheight, G3D, "Memcpy fbo download %08x -> %08x skipped, %d+%d is taller than %d", src, dst, srcY, srcH, srcBuffer->bufferHeight);
} else if (g_Config.iSkipGPUReadbackMode == (int)SkipGPUReadbackMode::NO && (!srcBuffer->memoryUpdated || channel == RASTER_DEPTH)) {
} else if (g_Config.iSkipGPUReadbackMode == (int)SkipGPUReadbackMode::NO_SKIP && (!srcBuffer->memoryUpdated || channel == RASTER_DEPTH)) {
Draw::ReadbackMode readbackMode = Draw::ReadbackMode::BLOCK;
if (PSP_CoreParameter().compat.flags().AllowDelayedReadbacks) {
readbackMode = Draw::ReadbackMode::OLD_DATA_OK;
Expand Down Expand Up @@ -2668,7 +2668,7 @@ bool FramebufferManagerCommon::NotifyBlockTransferBefore(u32 dstBasePtr, int dst
srcBasePtr, srcRect.x_bytes / bpp, srcRect.y, srcStride,
dstBasePtr, dstRect.x_bytes / bpp, dstRect.y, dstStride);
FlushBeforeCopy();
if (g_Config.iSkipGPUReadbackMode == (int)SkipGPUReadbackMode::NO && !srcRect.vfb->memoryUpdated) {
if (g_Config.iSkipGPUReadbackMode == (int)SkipGPUReadbackMode::NO_SKIP && !srcRect.vfb->memoryUpdated) {
const int srcBpp = BufferFormatBytesPerPixel(srcRect.vfb->fb_format);
const float srcXFactor = (float)bpp / srcBpp;
const bool tooTall = srcY + srcRect.h > srcRect.vfb->bufferHeight;
Expand Down
2 changes: 1 addition & 1 deletion UI/EmuScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ void EmuScreen::bootGame(const Path &filename) {
g_OSD.Show(OSDType::MESSAGE_WARNING, gr->T("BufferedRenderingRequired", "Warning: This game requires Rendering Mode to be set to Buffered."), 10.0f);
}

if (PSP_CoreParameter().compat.flags().RequireBlockTransfer && g_Config.iSkipGPUReadbackMode != (int)SkipGPUReadbackMode::NO) {
if (PSP_CoreParameter().compat.flags().RequireBlockTransfer && g_Config.iSkipGPUReadbackMode != (int)SkipGPUReadbackMode::NO_SKIP) {
auto gr = GetI18NCategory(I18NCat::GRAPHICS);
g_OSD.Show(OSDType::MESSAGE_WARNING, gr->T("BlockTransferRequired", "Warning: This game requires Skip GPU Readbacks be set to No."), 10.0f);
}
Expand Down
2 changes: 1 addition & 1 deletion headless/Headless.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ int main(int argc, const char* argv[])
g_Config.sReportHost.clear();
g_Config.bAutoSaveSymbolMap = false;
g_Config.bSkipBufferEffects = false;
g_Config.iSkipGPUReadbackMode = (int)SkipGPUReadbackMode::NO;
g_Config.iSkipGPUReadbackMode = (int)SkipGPUReadbackMode::NO_SKIP;
g_Config.bHardwareTransform = true;
g_Config.iAnisotropyLevel = 0; // When testing mipmapping we really don't want this.
g_Config.iMultiSampleLevel = 0;
Expand Down
2 changes: 1 addition & 1 deletion libretro/libretro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ static void check_variables(CoreParameter &coreParam)
if (!strcmp(var.value, "disabled"))
g_Config.iSkipGPUReadbackMode = (int)SkipGPUReadbackMode::SKIP;
else
g_Config.iSkipGPUReadbackMode = (int)SkipGPUReadbackMode::NO;
g_Config.iSkipGPUReadbackMode = (int)SkipGPUReadbackMode::NO_SKIP;
}

var.key = "ppsspp_frameskip";
Expand Down

0 comments on commit e626144

Please sign in to comment.