mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Core: Fix some minor gcc warnings.
This commit is contained in:
parent
2ecaa61fa5
commit
3ac669f80b
3 changed files with 12 additions and 10 deletions
|
@ -22,7 +22,7 @@
|
|||
#include "Common/Log.h"
|
||||
#include "Common/Thread/ThreadUtil.h"
|
||||
|
||||
#if PPSSPP_PLATFORM(ANDROID) || PPSSPP_PLATFORM(LINUX)
|
||||
#if (PPSSPP_PLATFORM(ANDROID) || PPSSPP_PLATFORM(LINUX)) && !defined(_GNU_SOURCE)
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
|
||||
|
|
|
@ -5597,17 +5597,16 @@ void __NetMatchingCallbacks() //(int matchingId)
|
|||
int delayus = adhocDefaultDelay;
|
||||
|
||||
auto params = matchingEvents.begin();
|
||||
if (params != matchingEvents.end())
|
||||
{
|
||||
u32_le* args = (u32_le*)&(*params);
|
||||
if (params != matchingEvents.end()) {
|
||||
u32_le *args = params->data;
|
||||
//auto context = findMatchingContext(args[0]);
|
||||
|
||||
if (actionAfterMatchingMipsCall < 0) {
|
||||
actionAfterMatchingMipsCall = __KernelRegisterActionType(AfterMatchingMipsCall::Create);
|
||||
}
|
||||
DEBUG_LOG(SCENET, "AdhocMatching - Remaining Events: %zu", matchingEvents.size());
|
||||
DEBUG_LOG(SCENET, "AdhocMatchingCallback: [ID=%i][EVENT=%i][%s]", args[0], args[1], mac2str((SceNetEtherAddr*)Memory::GetPointer(args[2])).c_str());
|
||||
AfterMatchingMipsCall* after = (AfterMatchingMipsCall*)__KernelCreateAction(actionAfterMatchingMipsCall);
|
||||
DEBUG_LOG(SCENET, "AdhocMatchingCallback: [ID=%i][EVENT=%i][%s]", args[0], args[1], mac2str((SceNetEtherAddr *)Memory::GetPointer(args[2])).c_str());
|
||||
AfterMatchingMipsCall *after = (AfterMatchingMipsCall *)__KernelCreateAction(actionAfterMatchingMipsCall);
|
||||
after->SetData(args[0], args[1], args[2]);
|
||||
hleEnqueueCall(args[5], 5, args, after);
|
||||
matchingEvents.pop_front();
|
||||
|
|
|
@ -455,10 +455,10 @@ bool TextureReplacer::PopulateLevel(ReplacedTextureLevel &level) {
|
|||
auto imageType = Identify(fp);
|
||||
if (imageType == ReplacedImageType::ZIM) {
|
||||
fseek(fp, 4, SEEK_SET);
|
||||
fread(&level.w, 1, 4, fp);
|
||||
fread(&level.h, 1, 4, fp);
|
||||
good = good && fread(&level.w, 4, 1, fp) == 1;
|
||||
good = good && fread(&level.h, 4, 1, fp) == 1;
|
||||
int flags;
|
||||
if (fread(&flags, 1, 4, fp) == 4) {
|
||||
if (good && fread(&flags, 4, 1, fp) == 1) {
|
||||
good = (flags & ZIM_FORMAT_MASK) == ZIM_RGBA8888;
|
||||
}
|
||||
} else if (imageType == ReplacedImageType::PNG) {
|
||||
|
@ -744,7 +744,10 @@ void ReplacedTexture::Load(int level, void *out, int rowPitch) {
|
|||
if (imageType == ReplacedImageType::ZIM) {
|
||||
size_t zimSize = File::GetFileSize(fp);
|
||||
std::unique_ptr<uint8_t[]> zim(new uint8_t[zimSize]);
|
||||
fread(&zim[0], 1, zimSize, fp);
|
||||
if (fread(&zim[0], 1, zimSize, fp) != zimSize) {
|
||||
ERROR_LOG(G3D, "Could not load texture replacement: %s - failed to read ZIM", info.file.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
int w, h, f;
|
||||
uint8_t *image;
|
||||
|
|
Loading…
Add table
Reference in a new issue