More include untangling

This commit is contained in:
Henrik Rydgård committed 2013-12-29 23:44:35 +01:00
1 parent 79ff2f0ba8
commit 87f203a5b8
14 files changed
+79 -64

No files matched your search

+2 -2
View File
@@ -17,8 +17,8 @@
#include "PSPNetconfDialog.h"
#include "ChunkFile.h"
#include "../Core/MemMap.h"
#include "../Core/HLE/sceNetAdhoc.h"
#include "Core/MemMap.h"
#include "Core/HLE/sceNetAdhoc.h"
#define NETCONF_CONNECT_ADHOC 2
#define NETCONF_CREATE_ADHOC 4
+2 -1
View File
@@ -18,6 +18,7 @@
#pragma once
#include "Core/Dialog/PSPDialog.h"
#include "Core/MemMap.h"
#include "Core/System.h"
struct SceUtilityNetconfData {
@@ -31,7 +32,7 @@ struct SceUtilityNetconfParam {
PSPPointer<SceUtilityNetconfData> NetconfData;
int netHotspot;
int netHotspotConnected;
int netWifiSpot;
int netWifiSpot;
};
class PSPNetconfDialog: public PSPDialog {
+41
View File
@@ -147,6 +147,47 @@ namespace
};
}
void SaveFileInfo::DoState(PointerWrap &p)
{
auto s = p.Section("SaveFileInfo", 1, 2);
if (!s)
return;
p.Do(size);
p.Do(saveName);
p.Do(idx);
p.DoArray(title, sizeof(title));
p.DoArray(saveTitle, sizeof(saveTitle));
p.DoArray(saveDetail, sizeof(saveDetail));
p.Do(modif_time);
if (s <= 1) {
u32 textureData;
int textureWidth;
int textureHeight;
p.Do(textureData);
p.Do(textureWidth);
p.Do(textureHeight);
if (textureData != 0) {
// Must be MODE_READ.
texture = new PPGeImage("");
texture->CompatLoad(textureData, textureWidth, textureHeight);
}
} else {
bool hasTexture = texture != NULL;
p.Do(hasTexture);
if (hasTexture) {
if (p.mode == p.MODE_READ) {
texture = new PPGeImage("");
}
texture->DoState(p);
}
}
}
SavedataParam::SavedataParam()
: pspParam(0)
, selectedSave(0)
+4 -42
View File
@@ -17,12 +17,13 @@
#pragma once
#include "Common/CommonTypes.h"
#include "Core/MemMap.h"
#include "Core/HLE/sceKernel.h"
#include "Core/HLE/sceRtc.h"
#include "Core/System.h"
#include "Core/Dialog/PSPDialog.h"
#include "Core/Util/PPGeDraw.h"
#include "Common/CommonTypes.h"
#undef st_ctime
#undef st_atime
@@ -263,48 +264,9 @@ struct SaveFileInfo
memset(&modif_time, 0, sizeof(modif_time));
}
void DoState(PointerWrap &p)
{
auto s = p.Section("SaveFileInfo", 1, 2);
if (!s)
return;
p.Do(size);
p.Do(saveName);
p.Do(idx);
p.DoArray(title, sizeof(title));
p.DoArray(saveTitle, sizeof(saveTitle));
p.DoArray(saveDetail, sizeof(saveDetail));
p.Do(modif_time);
if (s <= 1) {
u32 textureData;
int textureWidth;
int textureHeight;
p.Do(textureData);
p.Do(textureWidth);
p.Do(textureHeight);
if (textureData != 0) {
// Must be MODE_READ.
texture = new PPGeImage("");
texture->CompatLoad(textureData, textureWidth, textureHeight);
}
} else {
bool hasTexture = texture != NULL;
p.Do(hasTexture);
if (hasTexture) {
if (p.mode == p.MODE_READ) {
texture = new PPGeImage("");
}
texture->DoState(p);
}
}
}
void DoState(PointerWrap &p);
};
class SavedataParam
{
public:
+9
View File
@@ -33,6 +33,7 @@
#include "Core/MIPS/MIPSAnalyst.h"
#include "Core/MIPS/JitCommon/JitCommon.h"
#include "Core/Host.h"
#include "Core/System.h"
#include "Core/PSPMixer.h"
#include "Core/HLE/HLE.h"
@@ -81,6 +82,14 @@ volatile CoreState coreState = CORE_STEPPING;
volatile bool coreStatePending = false;
static volatile CPUThreadState cpuThreadState = CPU_THREAD_NOT_RUNNING;
void UpdateUIState(GlobalUIState newState) {
// Never leave the EXIT state.
if (globalUIState != newState && globalUIState != UISTATE_EXIT) {
globalUIState = newState;
host->UpdateDisassembly();
}
}
bool IsAudioInitialised() {
return mixer != NULL;
}
+1 -11
View File
@@ -17,9 +17,6 @@
#pragma once
#include "Globals.h"
#include "Core/MemMap.h"
#include "Core/Host.h"
#include "Core/CoreParameter.h"
#include "Core/ELF/ParamSFO.h"
@@ -28,7 +25,6 @@ class MetaFileSystem;
extern MetaFileSystem pspFileSystem;
extern ParamSFOData g_paramSFO;
// To synchronize the two UIs, we need to know which state we're in.
enum GlobalUIState {
UISTATE_MENU,
@@ -49,13 +45,7 @@ enum PSPDirectories {
extern GlobalUIState globalUIState;
inline static void UpdateUIState(GlobalUIState newState) {
// Never leave the EXIT state.
if (globalUIState != newState && globalUIState != UISTATE_EXIT) {
globalUIState = newState;
host->UpdateDisassembly();
}
}
void UpdateUIState(GlobalUIState newState);
bool PSP_Init(const CoreParameter &coreParam, std::string *error_string);
bool PSP_IsInited();
+3
View File
@@ -15,6 +15,9 @@
// Official git repository and contact information can be found at
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
#include <algorithm>
#include <set>
#include "file/file_util.h"
#include "ext/libzip/zip.h"
#include "thread/thread.h"
+1
View File
@@ -22,6 +22,7 @@
#include "util/text/utf8.h"
#include "Common/ChunkFile.h"
#include "Core/Host.h"
#include "GPU/ge_constants.h"
#include "GPU/GPUState.h"
#include "GPU/GPUInterface.h"
+3 -2
View File
@@ -15,6 +15,9 @@
// Official git repository and contact information can be found at
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
#include <set>
#include <algorithm>
#include "gfx_es2/glsl_program.h"
#include "gfx_es2/gl_state.h"
#include "gfx_es2/fbo.h"
@@ -38,8 +41,6 @@
#include "UI/OnScreenDisplay.h"
#include <algorithm>
#if defined(USING_GLES2)
#ifndef GL_READ_FRAMEBUFFER
#define GL_READ_FRAMEBUFFER GL_FRAMEBUFFER
+2
View File
@@ -18,6 +18,8 @@
#pragma once
#include <list>
#include <set>
#include <algorithm>
#include "gfx/gl_common.h"
#include "gfx_es2/fbo.h"
+1
View File
@@ -18,6 +18,7 @@
#include <map>
#include <algorithm>
#include "Core/Host.h"
#include "Core/MemMap.h"
#include "Core/Reporting.h"
#include "GPU/ge_constants.h"
+8
View File
@@ -21,6 +21,7 @@
#include "GPU/Common/TextureDecoder.h"
#include "Core/Config.h"
#include "Core/Debugger/Breakpoints.h"
#include "Core/Host.h"
#include "Core/MemMap.h"
#include "Core/HLE/sceKernelInterrupt.h"
#include "Core/HLE/sceGe.h"
@@ -170,6 +171,13 @@ SoftGPU::~SoftGPU()
glDeleteTextures(1, &temp_texture);
}
void SoftGPU::SetDisplayFramebuffer(u32 framebuf, u32 stride, GEBufferFormat format) {
displayFramebuf_ = framebuf;
displayStride_ = stride;
displayFormat_ = format;
host->GPUNotifyDisplay(framebuf, stride, format);
}
// Copies RGBA8 data from RAM to the currently bound render target.
void SoftGPU::CopyToCurrentFboFromDisplayRam(int srcwidth, int srcheight)
{
+1 -6
View File
@@ -55,12 +55,7 @@ public:
virtual void ExecuteOp(u32 op, u32 diff);
virtual void BeginFrame() {}
virtual void SetDisplayFramebuffer(u32 framebuf, u32 stride, GEBufferFormat format) {
displayFramebuf_ = framebuf;
displayStride_ = stride;
displayFormat_ = format;
host->GPUNotifyDisplay(framebuf, stride, format);
}
virtual void SetDisplayFramebuffer(u32 framebuf, u32 stride, GEBufferFormat format);
virtual void CopyDisplayToOutput();
virtual void UpdateStats();
virtual void InvalidateCache(u32 addr, int size, GPUInvalidationType type);
+1
View File
@@ -31,6 +31,7 @@
#include "UI/EmuScreen.h"
#include "UI/MainScreen.h"
#include "Core/Config.h"
#include "Core/Host.h"
#include "Core/System.h"
#include "Core/MIPS/JitCommon/JitCommon.h"
#include "Core/HLE/sceUtility.h"