mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-10-08 19:43:40 +00:00
Warning fixes and stuff
This commit is contained in:
parent
bf6f8b6afb
commit
0d0b43818c
@ -1144,7 +1144,7 @@ void sceKernelStartModule(u32 moduleId, u32 argsize, u32 argAddr, u32 returnValu
|
||||
u32 stacksize = 0x40000;
|
||||
u32 attr = 0;
|
||||
int stackPartition = 0;
|
||||
SceKernelSMOption smoption;
|
||||
SceKernelSMOption smoption = {0};
|
||||
if (optionAddr) {
|
||||
Memory::ReadStruct(optionAddr, &smoption);
|
||||
}
|
||||
|
@ -432,7 +432,7 @@ int __KernelValidateSendMsgPipe(SceUID uid, u32 sendBufAddr, u32 sendSize, int w
|
||||
{
|
||||
if (sendSize & 0x80000000)
|
||||
{
|
||||
ERROR_LOG(HLE, "__KernelSendMsgPipe(%d): illegal size %d", uid, sendSize);
|
||||
ERROR_LOG(HLE, "__KernelSendMsgPipe(%d, %i, ...): illegal size %d", uid, sendSize);
|
||||
return SCE_KERNEL_ERROR_ILLEGAL_ADDR;
|
||||
}
|
||||
|
||||
@ -444,7 +444,7 @@ int __KernelValidateSendMsgPipe(SceUID uid, u32 sendBufAddr, u32 sendSize, int w
|
||||
|
||||
if (waitMode != SCE_KERNEL_MPW_ASAP && waitMode != SCE_KERNEL_MPW_FULL)
|
||||
{
|
||||
ERROR_LOG(HLE, "__KernelSendMsgPipe(%d): invalid wait mode %d", uid, waitMode);
|
||||
ERROR_LOG(HLE, "__KernelSendMsgPipe(%d, waitmode=%i): invalid wait mode %d", uid, waitMode);
|
||||
return SCE_KERNEL_ERROR_ILLEGAL_MODE;
|
||||
}
|
||||
|
||||
@ -452,12 +452,12 @@ int __KernelValidateSendMsgPipe(SceUID uid, u32 sendBufAddr, u32 sendSize, int w
|
||||
{
|
||||
if (!__KernelIsDispatchEnabled())
|
||||
{
|
||||
WARN_LOG(HLE, "__KernelSendMsgPipe(%d): dispatch disabled", uid, waitMode);
|
||||
WARN_LOG(HLE, "__KernelSendMsgPipe(%d, waitmode=%i): dispatch disabled", uid, waitMode);
|
||||
return SCE_KERNEL_ERROR_CAN_NOT_WAIT;
|
||||
}
|
||||
if (__IsInInterrupt())
|
||||
{
|
||||
WARN_LOG(HLE, "__KernelSendMsgPipe(%d): in interrupt", uid, waitMode);
|
||||
WARN_LOG(HLE, "__KernelSendMsgPipe(%d, waitmode=%i): in interrupt", uid, waitMode);
|
||||
return SCE_KERNEL_ERROR_ILLEGAL_CONTEXT;
|
||||
}
|
||||
}
|
||||
|
@ -477,7 +477,7 @@ int __KernelWaitSema(SceUID id, int wantedCount, u32 timeoutPtr, bool processCal
|
||||
int sceKernelWaitSema(SceUID id, int wantedCount, u32 timeoutPtr)
|
||||
{
|
||||
int result = __KernelWaitSema(id, wantedCount, timeoutPtr, false);
|
||||
if (result == SCE_KERNEL_ERROR_ILLEGAL_COUNT)
|
||||
if (result == (int)SCE_KERNEL_ERROR_ILLEGAL_COUNT)
|
||||
DEBUG_LOG(HLE, "SCE_KERNEL_ERROR_ILLEGAL_COUNT=sceKernelWaitSema(%i, %i, %i)", id, wantedCount, timeoutPtr)
|
||||
else if (result == 0)
|
||||
DEBUG_LOG(HLE, "0=sceKernelWaitSema(%i, %i, %i)", id, wantedCount, timeoutPtr)
|
||||
@ -489,7 +489,7 @@ int sceKernelWaitSema(SceUID id, int wantedCount, u32 timeoutPtr)
|
||||
int sceKernelWaitSemaCB(SceUID id, int wantedCount, u32 timeoutPtr)
|
||||
{
|
||||
int result = __KernelWaitSema(id, wantedCount, timeoutPtr, true);
|
||||
if (result == SCE_KERNEL_ERROR_ILLEGAL_COUNT)
|
||||
if (result == (int)SCE_KERNEL_ERROR_ILLEGAL_COUNT)
|
||||
DEBUG_LOG(HLE, "SCE_KERNEL_ERROR_ILLEGAL_COUNT=sceKernelWaitSemaCB(%i, %i, %i)", id, wantedCount, timeoutPtr)
|
||||
else if (result == 0)
|
||||
DEBUG_LOG(HLE, "0=sceKernelWaitSemaCB(%i, %i, %i)", id, wantedCount, timeoutPtr)
|
||||
@ -504,7 +504,7 @@ int sceKernelPollSema(SceUID id, int wantedCount)
|
||||
if (wantedCount <= 0)
|
||||
{
|
||||
DEBUG_LOG(HLE, "SCE_KERNEL_ERROR_ILLEGAL_COUNT=sceKernelPollSema(%i, %i)", id, wantedCount);
|
||||
return SCE_KERNEL_ERROR_ILLEGAL_COUNT;
|
||||
return (int)SCE_KERNEL_ERROR_ILLEGAL_COUNT;
|
||||
}
|
||||
|
||||
u32 error;
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include "UI/MiscScreens.h"
|
||||
#include "UI/CwCheatScreen.h"
|
||||
|
||||
bool enableAll = false;
|
||||
static bool enableAll = false;
|
||||
static std::vector<std::string> cheatList;
|
||||
extern void DrawBackground(float alpha);
|
||||
static CWCheatEngine *cheatEngine2;
|
||||
@ -55,11 +55,11 @@ std::vector<std::string> CwCheatScreen::CreateCodeList() {
|
||||
formattedList.push_back(cheatList[i].substr(4));
|
||||
enableCheat[j++] = false;
|
||||
}
|
||||
|
||||
}
|
||||
delete cheatEngine2;
|
||||
return formattedList;
|
||||
}
|
||||
|
||||
void CwCheatScreen::CreateViews() {
|
||||
using namespace UI;
|
||||
std::vector<std::string> formattedList;
|
||||
@ -88,14 +88,14 @@ void CwCheatScreen::CreateViews() {
|
||||
for (size_t i = 0; i < formattedList.size(); i++) {
|
||||
name = formattedList[i].c_str();
|
||||
rightColumn->Add(new CheatCheckBox(&enableCheat[i], k->T(name), "" ))->OnClick.Handle(this, &CwCheatScreen::OnCheckBox);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
UI::EventReturn CwCheatScreen::OnBack(UI::EventParams ¶ms)
|
||||
{
|
||||
screenManager()->finishDialog(this, DR_OK);
|
||||
os.open(activeCheatFile.c_str());
|
||||
for (int j = 0; j < cheatList.size(); j++) {
|
||||
for (int j = 0; j < (int)cheatList.size(); j++) {
|
||||
os << cheatList[j];
|
||||
if (j < cheatList.size() - 1) {
|
||||
os << "\n";
|
||||
@ -105,12 +105,13 @@ UI::EventReturn CwCheatScreen::OnBack(UI::EventParams ¶ms)
|
||||
g_Config.bReloadCheats = true;
|
||||
return UI::EVENT_DONE;
|
||||
}
|
||||
|
||||
UI::EventReturn CwCheatScreen::OnEnableAll(UI::EventParams ¶ms)
|
||||
{
|
||||
std::vector<std::string> temp = cheatList;
|
||||
enableAll = !enableAll;
|
||||
os.open(activeCheatFile.c_str());
|
||||
for (int j = 0; j < temp.size(); j++) {
|
||||
for (size_t j = 0; j < temp.size(); j++) {
|
||||
if (enableAll == 1 && temp[j].substr(0, 3) == "_C0"){
|
||||
temp[j].replace(0,3,"_C1");
|
||||
|
||||
@ -124,7 +125,7 @@ UI::EventReturn CwCheatScreen::OnEnableAll(UI::EventParams ¶ms)
|
||||
for (int y = 0; y < 64; y++) {
|
||||
enableCheat[y] = enableAll;
|
||||
}
|
||||
for (int i = 0; i < temp.size(); i++) {
|
||||
for (int i = 0; i < (int)temp.size(); i++) {
|
||||
os << temp[i];
|
||||
if (i < temp.size() - 1) {
|
||||
os << "\n";
|
||||
@ -159,8 +160,6 @@ UI::EventReturn CwCheatScreen::OnImportCheat(UI::EventParams ¶ms)
|
||||
getline(is, line);
|
||||
getline(is, line);
|
||||
|
||||
|
||||
|
||||
do {
|
||||
if (finished == false){
|
||||
getline(is, line);
|
||||
@ -168,7 +167,7 @@ UI::EventReturn CwCheatScreen::OnImportCheat(UI::EventParams ¶ms)
|
||||
if (line.substr(0, 3) == "_C0")
|
||||
{
|
||||
//Test if cheat already exists in cheatList
|
||||
for (int j = 0; j < formattedList.size(); j++) {
|
||||
for (size_t j = 0; j < formattedList.size(); j++) {
|
||||
if (line.substr(4) == formattedList[j]) {
|
||||
finished = false;
|
||||
goto loop;
|
||||
@ -187,15 +186,15 @@ UI::EventReturn CwCheatScreen::OnImportCheat(UI::EventParams ¶ms)
|
||||
loop:;
|
||||
} while (line.substr(0, 2) != "_S");
|
||||
finished = true;
|
||||
}
|
||||
}
|
||||
if (finished == true)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (newList.size() != 0)
|
||||
{
|
||||
os << "\n";
|
||||
}
|
||||
for (int i = 0; i < newList.size(); i++) {
|
||||
for (int i = 0; i < (int)newList.size(); i++) {
|
||||
os << newList[i];
|
||||
if (i < newList.size() - 1) {
|
||||
os << "\n";
|
||||
@ -214,15 +213,14 @@ UI::EventReturn CwCheatScreen::OnCheckBox(UI::EventParams ¶ms) {
|
||||
}
|
||||
|
||||
void CwCheatScreen::processFileOn(std::string activatedCheat) {
|
||||
|
||||
for (int i = 0; i < cheatList.size(); i++) {
|
||||
for (size_t i = 0; i < cheatList.size(); i++) {
|
||||
if (cheatList[i].substr(4) == activatedCheat) {
|
||||
cheatList[i] = "_C1 " + activatedCheat;
|
||||
}
|
||||
}
|
||||
|
||||
os.open(activeCheatFile.c_str());
|
||||
for (int j = 0; j < cheatList.size(); j++) {
|
||||
for (size_t j = 0; j < cheatList.size(); j++) {
|
||||
os << cheatList[j];
|
||||
if (j < cheatList.size() - 1) {
|
||||
os << "\n";
|
||||
@ -232,14 +230,14 @@ void CwCheatScreen::processFileOn(std::string activatedCheat) {
|
||||
}
|
||||
|
||||
void CwCheatScreen::processFileOff(std::string deactivatedCheat) {
|
||||
for (int i = 0; i < cheatList.size(); i++) {
|
||||
for (size_t i = 0; i < cheatList.size(); i++) {
|
||||
if (cheatList[i].substr(4) == deactivatedCheat) {
|
||||
cheatList[i] = "_C0 " + deactivatedCheat;
|
||||
}
|
||||
}
|
||||
|
||||
os.open(activeCheatFile.c_str());
|
||||
for (int j = 0; j < cheatList.size(); j++) {
|
||||
for (size_t j = 0; j < cheatList.size(); j++) {
|
||||
os << cheatList[j];
|
||||
if (j < cheatList.size() - 1) {
|
||||
os << "\n";
|
||||
|
@ -24,7 +24,8 @@
|
||||
// per game.
|
||||
class GameSettingsScreen : public UIDialogScreenWithBackground {
|
||||
public:
|
||||
GameSettingsScreen(std::string gamePath, std::string gameID = "") : gamePath_(gamePath), gameID_(gameID), iAlternateSpeedPercent_(3), enableReports_(false) {}
|
||||
GameSettingsScreen(std::string gamePath, std::string gameID = "")
|
||||
: gamePath_(gamePath), gameID_(gameID), iAlternateSpeedPercent_(3), enableReports_(false) {}
|
||||
|
||||
virtual void update(InputState &input);
|
||||
|
||||
@ -55,8 +56,8 @@ private:
|
||||
|
||||
// Temporaries to convert bools to int settings
|
||||
bool cap60FPS_;
|
||||
bool enableReports_;
|
||||
int iAlternateSpeedPercent_;
|
||||
bool enableReports_;
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -70,9 +70,8 @@ void DialogManager::AddDlg(Dialog *dialog)
|
||||
bool DialogManager::IsDialogMessage(LPMSG message)
|
||||
{
|
||||
WindowList::iterator iter;
|
||||
for (iter=dialogs.begin(); iter!=dialogs.end(); iter++)
|
||||
{
|
||||
if (::IsDialogMessage((*iter)->GetDlgHandle(),message))
|
||||
for (iter = dialogs.begin(); iter != dialogs.end(); iter++) {
|
||||
if (::IsDialogMessage((*iter)->GetDlgHandle(), message))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -162,8 +162,7 @@ int WINAPI WinMain(HINSTANCE _hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLin
|
||||
//Translate accelerators and dialog messages...
|
||||
HWND wnd;
|
||||
HACCEL accel;
|
||||
if (g_debuggerActive)
|
||||
{
|
||||
if (g_debuggerActive) {
|
||||
wnd = disasmWindow[0]->GetDlgHandle();
|
||||
accel = hDebugAccelTable;
|
||||
} else {
|
||||
|
@ -5,9 +5,9 @@ LOCAL_PATH := $(call my-dir)
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := native_audio
|
||||
LOCAL_CFLAGS := -O3 -fsigned-char -ffast-math -Wall -Wno-multichar -Wno-psabi
|
||||
LOCAL_CFLAGS := -O3 -fsigned-char -ffast-math -Wall -Wno-multichar -Wno-psabi -Wno-literal-suffix
|
||||
# yes, it's really CPPFLAGS for C++
|
||||
LOCAL_CPPFLAGS := -std=gnu++11 -fno-rtti
|
||||
LOCAL_CPPFLAGS := -fno-exceptions -std=gnu++11 -fno-rtti
|
||||
NATIVE := ../../native
|
||||
LOCAL_SRC_FILES := \
|
||||
$(NATIVE)/android/native-audio-so.cpp
|
||||
@ -26,9 +26,9 @@ LOCAL_MODULE := ppsspp_jni
|
||||
NATIVE := ../../native
|
||||
SRC := ../..
|
||||
|
||||
LOCAL_CFLAGS := -DUSE_FFMPEG -DUSE_PROFILER -DUSING_GLES2 -O3 -fsigned-char -Wall -Wno-multichar -Wno-psabi -Wno-unused-variable -fno-strict-aliasing -ffast-math
|
||||
LOCAL_CFLAGS := -DUSE_FFMPEG -DUSE_PROFILER -DUSING_GLES2 -O3 -ffast-math -fsigned-char -Wall -Wno-multichar -Wno-psabi -Wno-unused-variable -fno-strict-aliasing
|
||||
# yes, it's really CPPFLAGS for C++
|
||||
LOCAL_CPPFLAGS := -std=gnu++11 -fno-rtti
|
||||
LOCAL_CPPFLAGS := -fno-exceptions -std=gnu++11 -fno-rtti -Wno-reorder -Wno-literal-suffix
|
||||
LOCAL_C_INCLUDES := \
|
||||
$(LOCAL_PATH)/../../Common \
|
||||
$(LOCAL_PATH)/../.. \
|
||||
@ -64,7 +64,6 @@ LOCAL_LDLIBS += $(LOCAL_PATH)/../../ffmpeg/android/x86/lib/libswresample.a
|
||||
LOCAL_LDLIBS += $(LOCAL_PATH)/../../ffmpeg/android/x86/lib/libswscale.a
|
||||
LOCAL_LDLIBS += $(LOCAL_PATH)/../../ffmpeg/android/x86/lib/libavutil.a
|
||||
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../ffmpeg/android/x86/include
|
||||
LOCAL_CFLAGS += -DARMEABI
|
||||
endif
|
||||
|
||||
# $(SRC)/Core/EmuThread.cpp \
|
||||
@ -74,7 +73,7 @@ endif
|
||||
|
||||
ifeq ($(TARGET_ARCH_ABI),x86)
|
||||
|
||||
LOCAL_CFLAGS := $(LOCAL_CFLAGS) -D_M_IX86 -fomit-frame-pointer
|
||||
LOCAL_CFLAGS := $(LOCAL_CFLAGS) -D_M_IX86 -fomit-frame-pointer -mtune=atom -mssse3
|
||||
|
||||
ARCH_FILES := \
|
||||
$(SRC)/Common/ABI.cpp \
|
||||
|
Loading…
Reference in New Issue
Block a user