mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 05:19:56 +00:00
Fix annoying name clashes (Status is in X11 headers..)
This commit is contained in:
parent
e488227398
commit
dc6a4ea753
@ -504,18 +504,18 @@ namespace Reporting
|
||||
g_Config.sReportHost = "default";
|
||||
}
|
||||
|
||||
Status GetStatus()
|
||||
ReportStatus GetStatus()
|
||||
{
|
||||
if (!serverWorking)
|
||||
return Status::FAILING;
|
||||
return ReportStatus::FAILING;
|
||||
|
||||
for (int pos = 0; pos < PAYLOAD_BUFFER_SIZE; ++pos)
|
||||
{
|
||||
if (payloadBuffer[pos].type != RequestType::NONE)
|
||||
return Status::BUSY;
|
||||
return ReportStatus::BUSY;
|
||||
}
|
||||
|
||||
return Status::WORKING;
|
||||
return ReportStatus::WORKING;
|
||||
}
|
||||
|
||||
int NextFreePos()
|
||||
|
@ -77,14 +77,14 @@ namespace Reporting
|
||||
// Returns true if that identifier has not been logged yet.
|
||||
bool ShouldLogOnce(const char *identifier);
|
||||
|
||||
enum class Status {
|
||||
enum class ReportStatus {
|
||||
WORKING,
|
||||
BUSY,
|
||||
FAILING,
|
||||
};
|
||||
|
||||
// Whether server requests appear to be working.
|
||||
Status GetStatus();
|
||||
ReportStatus GetStatus();
|
||||
|
||||
// Return the currently active host (or blank if not active.)
|
||||
std::string ServerHost();
|
||||
|
@ -96,7 +96,7 @@ struct TexCacheEntry {
|
||||
// After marking STATUS_UNRELIABLE, if it stays the same this many frames we'll trust it again.
|
||||
const static int FRAMES_REGAIN_TRUST = 1000;
|
||||
|
||||
enum Status {
|
||||
enum TexStatus {
|
||||
STATUS_HASHING = 0x00,
|
||||
STATUS_RELIABLE = 0x01, // Don't bother rehashing.
|
||||
STATUS_UNRELIABLE = 0x02, // Always recheck hash.
|
||||
@ -156,19 +156,19 @@ struct TexCacheEntry {
|
||||
bool sClamp;
|
||||
bool tClamp;
|
||||
|
||||
Status GetHashStatus() {
|
||||
return Status(status & STATUS_MASK);
|
||||
TexStatus GetHashStatus() {
|
||||
return TexStatus(status & STATUS_MASK);
|
||||
}
|
||||
void SetHashStatus(Status newStatus) {
|
||||
void SetHashStatus(TexStatus newStatus) {
|
||||
status = (status & ~STATUS_MASK) | newStatus;
|
||||
}
|
||||
Status GetAlphaStatus() {
|
||||
return Status(status & STATUS_ALPHA_MASK);
|
||||
TexStatus GetAlphaStatus() {
|
||||
return TexStatus(status & STATUS_ALPHA_MASK);
|
||||
}
|
||||
void SetAlphaStatus(Status newStatus) {
|
||||
void SetAlphaStatus(TexStatus newStatus) {
|
||||
status = (status & ~STATUS_ALPHA_MASK) | newStatus;
|
||||
}
|
||||
void SetAlphaStatus(Status newStatus, int level) {
|
||||
void SetAlphaStatus(TexStatus newStatus, int level) {
|
||||
// For non-level zero, only set more restrictive.
|
||||
if (newStatus == STATUS_ALPHA_UNKNOWN || level == 0) {
|
||||
SetAlphaStatus(newStatus);
|
||||
|
@ -407,7 +407,7 @@ void TextureCacheD3D11::ApplyTextureFramebuffer(TexCacheEntry *entry, VirtualFra
|
||||
const u32 bytesPerColor = clutFormat == GE_CMODE_32BIT_ABGR8888 ? sizeof(u32) : sizeof(u16);
|
||||
const u32 clutTotalColors = clutMaxBytes_ / bytesPerColor;
|
||||
|
||||
TexCacheEntry::Status alphaStatus = CheckAlpha(clutBuf_, GetClutDestFormatD3D11(clutFormat), clutTotalColors, clutTotalColors, 1);
|
||||
TexCacheEntry::TexStatus alphaStatus = CheckAlpha(clutBuf_, GetClutDestFormatD3D11(clutFormat), clutTotalColors, clutTotalColors, 1);
|
||||
gstate_c.SetTextureFullAlpha(alphaStatus == TexCacheEntry::STATUS_ALPHA_FULL);
|
||||
} else {
|
||||
entry->status &= ~TexCacheEntry::STATUS_DEPALETTIZE;
|
||||
@ -557,7 +557,7 @@ void TextureCacheD3D11::BuildTexture(TexCacheEntry *const entry, bool replaceIma
|
||||
entry->status &= ~TexCacheEntry::STATUS_BAD_MIPS;
|
||||
}
|
||||
if (replaced.Valid()) {
|
||||
entry->SetAlphaStatus(TexCacheEntry::Status(replaced.AlphaStatus()));
|
||||
entry->SetAlphaStatus(TexCacheEntry::TexStatus(replaced.AlphaStatus()));
|
||||
}
|
||||
}
|
||||
|
||||
@ -602,7 +602,7 @@ DXGI_FORMAT TextureCacheD3D11::GetDestFormat(GETextureFormat format, GEPaletteFo
|
||||
}
|
||||
}
|
||||
|
||||
TexCacheEntry::Status TextureCacheD3D11::CheckAlpha(const u32 *pixelData, u32 dstFmt, int stride, int w, int h) {
|
||||
TexCacheEntry::TexStatus TextureCacheD3D11::CheckAlpha(const u32 *pixelData, u32 dstFmt, int stride, int w, int h) {
|
||||
CheckAlphaResult res;
|
||||
switch (dstFmt) {
|
||||
case DXGI_FORMAT_B4G4R4A4_UNORM:
|
||||
@ -620,7 +620,7 @@ TexCacheEntry::Status TextureCacheD3D11::CheckAlpha(const u32 *pixelData, u32 ds
|
||||
break;
|
||||
}
|
||||
|
||||
return (TexCacheEntry::Status)res;
|
||||
return (TexCacheEntry::TexStatus)res;
|
||||
}
|
||||
|
||||
ReplacedTextureFormat FromD3D11Format(u32 fmt) {
|
||||
@ -721,7 +721,7 @@ void TextureCacheD3D11::LoadTextureLevel(TexCacheEntry &entry, ReplacedTexture &
|
||||
|
||||
// We check before scaling since scaling shouldn't invent alpha from a full alpha texture.
|
||||
if ((entry.status & TexCacheEntry::STATUS_CHANGE_FREQUENT) == 0) {
|
||||
TexCacheEntry::Status alphaStatus = CheckAlpha(pixelData, dstFmt, decPitch / bpp, w, h);
|
||||
TexCacheEntry::TexStatus alphaStatus = CheckAlpha(pixelData, dstFmt, decPitch / bpp, w, h);
|
||||
entry.SetAlphaStatus(alphaStatus, level);
|
||||
} else {
|
||||
entry.SetAlphaStatus(TexCacheEntry::STATUS_ALPHA_UNKNOWN);
|
||||
|
@ -74,7 +74,7 @@ protected:
|
||||
private:
|
||||
void LoadTextureLevel(TexCacheEntry &entry, ReplacedTexture &replaced, int level, int maxLevel, bool replaceImages, int scaleFactor, DXGI_FORMAT dstFmt);
|
||||
DXGI_FORMAT GetDestFormat(GETextureFormat format, GEPaletteFormat clutFormat) const;
|
||||
TexCacheEntry::Status CheckAlpha(const u32 *pixelData, u32 dstFmt, int stride, int w, int h);
|
||||
TexCacheEntry::TexStatus CheckAlpha(const u32 *pixelData, u32 dstFmt, int stride, int w, int h);
|
||||
void UpdateCurrentClut(GEPaletteFormat clutFormat, u32 clutBase, bool clutIndexIsSimple) override;
|
||||
|
||||
void ApplyTextureFramebuffer(TexCacheEntry *entry, VirtualFramebuffer *framebuffer) override;
|
||||
|
@ -454,7 +454,7 @@ void TextureCacheDX9::ApplyTextureFramebuffer(TexCacheEntry *entry, VirtualFrame
|
||||
const u32 bytesPerColor = clutFormat == GE_CMODE_32BIT_ABGR8888 ? sizeof(u32) : sizeof(u16);
|
||||
const u32 clutTotalColors = clutMaxBytes_ / bytesPerColor;
|
||||
|
||||
TexCacheEntry::Status alphaStatus = CheckAlpha(clutBuf_, getClutDestFormat(clutFormat), clutTotalColors, clutTotalColors, 1);
|
||||
TexCacheEntry::TexStatus alphaStatus = CheckAlpha(clutBuf_, getClutDestFormat(clutFormat), clutTotalColors, clutTotalColors, 1);
|
||||
gstate_c.SetTextureFullAlpha(alphaStatus == TexCacheEntry::STATUS_ALPHA_FULL);
|
||||
} else {
|
||||
entry->status &= ~TexCacheEntry::STATUS_DEPALETTIZE;
|
||||
@ -599,7 +599,7 @@ void TextureCacheDX9::BuildTexture(TexCacheEntry *const entry, bool replaceImage
|
||||
entry->status &= ~TexCacheEntry::STATUS_BAD_MIPS;
|
||||
}
|
||||
if (replaced.Valid()) {
|
||||
entry->SetAlphaStatus(TexCacheEntry::Status(replaced.AlphaStatus()));
|
||||
entry->SetAlphaStatus(TexCacheEntry::TexStatus(replaced.AlphaStatus()));
|
||||
}
|
||||
}
|
||||
|
||||
@ -625,7 +625,7 @@ D3DFORMAT TextureCacheDX9::GetDestFormat(GETextureFormat format, GEPaletteFormat
|
||||
}
|
||||
}
|
||||
|
||||
TexCacheEntry::Status TextureCacheDX9::CheckAlpha(const u32 *pixelData, u32 dstFmt, int stride, int w, int h) {
|
||||
TexCacheEntry::TexStatus TextureCacheDX9::CheckAlpha(const u32 *pixelData, u32 dstFmt, int stride, int w, int h) {
|
||||
CheckAlphaResult res;
|
||||
switch (dstFmt) {
|
||||
case D3DFMT_A4R4G4B4:
|
||||
@ -643,7 +643,7 @@ TexCacheEntry::Status TextureCacheDX9::CheckAlpha(const u32 *pixelData, u32 dstF
|
||||
break;
|
||||
}
|
||||
|
||||
return (TexCacheEntry::Status)res;
|
||||
return (TexCacheEntry::TexStatus)res;
|
||||
}
|
||||
|
||||
ReplacedTextureFormat FromD3D9Format(u32 fmt) {
|
||||
@ -736,7 +736,7 @@ void TextureCacheDX9::LoadTextureLevel(TexCacheEntry &entry, ReplacedTexture &re
|
||||
|
||||
// We check before scaling since scaling shouldn't invent alpha from a full alpha texture.
|
||||
if ((entry.status & TexCacheEntry::STATUS_CHANGE_FREQUENT) == 0) {
|
||||
TexCacheEntry::Status alphaStatus = CheckAlpha(pixelData, dstFmt, decPitch / bpp, w, h);
|
||||
TexCacheEntry::TexStatus alphaStatus = CheckAlpha(pixelData, dstFmt, decPitch / bpp, w, h);
|
||||
entry.SetAlphaStatus(alphaStatus, level);
|
||||
} else {
|
||||
entry.SetAlphaStatus(TexCacheEntry::STATUS_ALPHA_UNKNOWN);
|
||||
|
@ -68,7 +68,7 @@ private:
|
||||
void UpdateSamplingParams(TexCacheEntry &entry, bool force);
|
||||
void LoadTextureLevel(TexCacheEntry &entry, ReplacedTexture &replaced, int level, int maxLevel, bool replaceImages, int scaleFactor, u32 dstFmt);
|
||||
D3DFORMAT GetDestFormat(GETextureFormat format, GEPaletteFormat clutFormat) const;
|
||||
TexCacheEntry::Status CheckAlpha(const u32 *pixelData, u32 dstFmt, int stride, int w, int h);
|
||||
TexCacheEntry::TexStatus CheckAlpha(const u32 *pixelData, u32 dstFmt, int stride, int w, int h);
|
||||
void UpdateCurrentClut(GEPaletteFormat clutFormat, u32 clutBase, bool clutIndexIsSimple) override;
|
||||
|
||||
void ApplyTextureFramebuffer(TexCacheEntry *entry, VirtualFramebuffer *framebuffer) override;
|
||||
|
@ -515,7 +515,7 @@ void TextureCacheGLES::ApplyTextureFramebuffer(TexCacheEntry *entry, VirtualFram
|
||||
const u32 bytesPerColor = clutFormat == GE_CMODE_32BIT_ABGR8888 ? sizeof(u32) : sizeof(u16);
|
||||
const u32 clutTotalColors = clutMaxBytes_ / bytesPerColor;
|
||||
|
||||
TexCacheEntry::Status alphaStatus = CheckAlpha(clutBuf_, getClutDestFormat(clutFormat), clutTotalColors, clutTotalColors, 1);
|
||||
TexCacheEntry::TexStatus alphaStatus = CheckAlpha(clutBuf_, getClutDestFormat(clutFormat), clutTotalColors, clutTotalColors, 1);
|
||||
gstate_c.SetTextureFullAlpha(alphaStatus == TexCacheEntry::STATUS_ALPHA_FULL);
|
||||
} else {
|
||||
entry->status &= ~TexCacheEntry::STATUS_DEPALETTIZE;
|
||||
@ -737,7 +737,7 @@ void TextureCacheGLES::BuildTexture(TexCacheEntry *const entry, bool replaceImag
|
||||
entry->status &= ~TexCacheEntry::STATUS_BAD_MIPS;
|
||||
}
|
||||
if (replaced.Valid()) {
|
||||
entry->SetAlphaStatus(TexCacheEntry::Status(replaced.AlphaStatus()));
|
||||
entry->SetAlphaStatus(TexCacheEntry::TexStatus(replaced.AlphaStatus()));
|
||||
}
|
||||
|
||||
if (gstate_c.Supports(GPU_SUPPORTS_ANISOTROPY)) {
|
||||
@ -813,7 +813,7 @@ void *TextureCacheGLES::DecodeTextureLevelOld(GETextureFormat format, GEPaletteF
|
||||
return tmpTexBufRearrange_.data();
|
||||
}
|
||||
|
||||
TexCacheEntry::Status TextureCacheGLES::CheckAlpha(const u32 *pixelData, GLenum dstFmt, int stride, int w, int h) {
|
||||
TexCacheEntry::TexStatus TextureCacheGLES::CheckAlpha(const u32 *pixelData, GLenum dstFmt, int stride, int w, int h) {
|
||||
CheckAlphaResult res;
|
||||
switch (dstFmt) {
|
||||
case GL_UNSIGNED_SHORT_4_4_4_4:
|
||||
@ -831,7 +831,7 @@ TexCacheEntry::Status TextureCacheGLES::CheckAlpha(const u32 *pixelData, GLenum
|
||||
break;
|
||||
}
|
||||
|
||||
return (TexCacheEntry::Status)res;
|
||||
return (TexCacheEntry::TexStatus)res;
|
||||
}
|
||||
|
||||
void TextureCacheGLES::LoadTextureLevel(TexCacheEntry &entry, ReplacedTexture &replaced, int level, bool replaceImages, int scaleFactor, GLenum dstFmt) {
|
||||
@ -880,7 +880,7 @@ void TextureCacheGLES::LoadTextureLevel(TexCacheEntry &entry, ReplacedTexture &r
|
||||
|
||||
// We check before scaling since scaling shouldn't invent alpha from a full alpha texture.
|
||||
if ((entry.status & TexCacheEntry::STATUS_CHANGE_FREQUENT) == 0) {
|
||||
TexCacheEntry::Status alphaStatus = CheckAlpha(pixelData, dstFmt, useUnpack ? bufw : w, w, h);
|
||||
TexCacheEntry::TexStatus alphaStatus = CheckAlpha(pixelData, dstFmt, useUnpack ? bufw : w, w, h);
|
||||
entry.SetAlphaStatus(alphaStatus, level);
|
||||
} else {
|
||||
entry.SetAlphaStatus(TexCacheEntry::STATUS_ALPHA_UNKNOWN);
|
||||
|
@ -81,7 +81,7 @@ private:
|
||||
void LoadTextureLevel(TexCacheEntry &entry, ReplacedTexture &replaced, int level, bool replaceImages, int scaleFactor, GLenum dstFmt);
|
||||
GLenum GetDestFormat(GETextureFormat format, GEPaletteFormat clutFormat) const;
|
||||
void *DecodeTextureLevelOld(GETextureFormat format, GEPaletteFormat clutformat, int level, GLenum dstFmt, int scaleFactor, int *bufw = 0);
|
||||
TexCacheEntry::Status CheckAlpha(const u32 *pixelData, GLenum dstFmt, int stride, int w, int h);
|
||||
TexCacheEntry::TexStatus CheckAlpha(const u32 *pixelData, GLenum dstFmt, int stride, int w, int h);
|
||||
void UpdateCurrentClut(GEPaletteFormat clutFormat, u32 clutBase, bool clutIndexIsSimple) override;
|
||||
void ApplyTextureFramebuffer(TexCacheEntry *entry, VirtualFramebuffer *framebuffer) override;
|
||||
|
||||
|
@ -83,7 +83,7 @@ public:
|
||||
}
|
||||
// No destructor needed - we always fully wipe.
|
||||
|
||||
enum Status : uint8_t {
|
||||
enum VAIStatus : uint8_t {
|
||||
VAI_NEW,
|
||||
VAI_HASHING,
|
||||
VAI_RELIABLE, // cache, don't hash
|
||||
@ -104,7 +104,7 @@ public:
|
||||
u16 numVerts = 0;
|
||||
u16 maxIndex = 0;
|
||||
s8 prim = GE_PRIM_INVALID;
|
||||
Status status = VAI_NEW;
|
||||
VAIStatus status = VAI_NEW;
|
||||
|
||||
// ID information
|
||||
int numDraws = 0;
|
||||
|
@ -414,7 +414,7 @@ void TextureCacheVulkan::ApplyTextureFramebuffer(TexCacheEntry *entry, VirtualFr
|
||||
const u32 bytesPerColor = clutFormat == GE_CMODE_32BIT_ABGR8888 ? sizeof(u32) : sizeof(u16);
|
||||
const u32 clutTotalColors = clutMaxBytes_ / bytesPerColor;
|
||||
|
||||
TexCacheEntry::Status alphaStatus = CheckAlpha(clutBuf_, getClutDestFormatVulkan(clutFormat), clutTotalColors, clutTotalColors, 1);
|
||||
TexCacheEntry::TexStatus alphaStatus = CheckAlpha(clutBuf_, getClutDestFormatVulkan(clutFormat), clutTotalColors, clutTotalColors, 1);
|
||||
gstate_c.SetTextureFullAlpha(alphaStatus == TexCacheEntry::STATUS_ALPHA_FULL);
|
||||
|
||||
framebufferManager_->RebindFramebuffer();
|
||||
@ -673,7 +673,7 @@ void TextureCacheVulkan::BuildTexture(TexCacheEntry *const entry, bool replaceIm
|
||||
entry->status &= ~TexCacheEntry::STATUS_BAD_MIPS;
|
||||
}
|
||||
if (replaced.Valid()) {
|
||||
entry->SetAlphaStatus(TexCacheEntry::Status(replaced.AlphaStatus()));
|
||||
entry->SetAlphaStatus(TexCacheEntry::TexStatus(replaced.AlphaStatus()));
|
||||
}
|
||||
entry->vkTex->texture_->EndCreate(cmdInit);
|
||||
}
|
||||
@ -703,7 +703,7 @@ VkFormat TextureCacheVulkan::GetDestFormat(GETextureFormat format, GEPaletteForm
|
||||
}
|
||||
}
|
||||
|
||||
TexCacheEntry::Status TextureCacheVulkan::CheckAlpha(const u32 *pixelData, VkFormat dstFmt, int stride, int w, int h) {
|
||||
TexCacheEntry::TexStatus TextureCacheVulkan::CheckAlpha(const u32 *pixelData, VkFormat dstFmt, int stride, int w, int h) {
|
||||
CheckAlphaResult res;
|
||||
switch (dstFmt) {
|
||||
case VULKAN_4444_FORMAT:
|
||||
@ -721,7 +721,7 @@ TexCacheEntry::Status TextureCacheVulkan::CheckAlpha(const u32 *pixelData, VkFor
|
||||
break;
|
||||
}
|
||||
|
||||
return (TexCacheEntry::Status)res;
|
||||
return (TexCacheEntry::TexStatus)res;
|
||||
}
|
||||
|
||||
void TextureCacheVulkan::LoadTextureLevel(TexCacheEntry &entry, uint8_t *writePtr, int rowPitch, int level, int scaleFactor, VkFormat dstFmt) {
|
||||
@ -754,7 +754,7 @@ void TextureCacheVulkan::LoadTextureLevel(TexCacheEntry &entry, uint8_t *writePt
|
||||
if ((entry.status & TexCacheEntry::STATUS_CHANGE_FREQUENT) == 0) {
|
||||
// TODO: When we decode directly, this can be more expensive (maybe not on mobile?)
|
||||
// This does allow us to skip alpha testing, though.
|
||||
TexCacheEntry::Status alphaStatus = CheckAlpha(pixelData, dstFmt, decPitch / bpp, w, h);
|
||||
TexCacheEntry::TexStatus alphaStatus = CheckAlpha(pixelData, dstFmt, decPitch / bpp, w, h);
|
||||
entry.SetAlphaStatus(alphaStatus, level);
|
||||
} else {
|
||||
entry.SetAlphaStatus(TexCacheEntry::STATUS_ALPHA_UNKNOWN);
|
||||
|
@ -125,7 +125,7 @@ protected:
|
||||
private:
|
||||
void LoadTextureLevel(TexCacheEntry &entry, uint8_t *writePtr, int rowPitch, int level, int scaleFactor, VkFormat dstFmt);
|
||||
VkFormat GetDestFormat(GETextureFormat format, GEPaletteFormat clutFormat) const;
|
||||
TexCacheEntry::Status CheckAlpha(const u32 *pixelData, VkFormat dstFmt, int stride, int w, int h);
|
||||
TexCacheEntry::TexStatus CheckAlpha(const u32 *pixelData, VkFormat dstFmt, int stride, int w, int h);
|
||||
void UpdateCurrentClut(GEPaletteFormat clutFormat, u32 clutBase, bool clutIndexIsSimple) override;
|
||||
|
||||
void ApplyTextureFramebuffer(TexCacheEntry *entry, VirtualFramebuffer *framebuffer) override;
|
||||
|
@ -364,17 +364,17 @@ void ReportFinishScreen::update() {
|
||||
I18NCategory *rp = GetI18NCategory("Reporting");
|
||||
|
||||
if (!setStatus_) {
|
||||
Reporting::Status status = Reporting::GetStatus();
|
||||
Reporting::ReportStatus status = Reporting::GetStatus();
|
||||
switch (status) {
|
||||
case Reporting::Status::WORKING:
|
||||
case Reporting::ReportStatus::WORKING:
|
||||
resultNotice_->SetText(rp->T("FeedbackSubmitDone", "Your data has been submitted."));
|
||||
break;
|
||||
|
||||
case Reporting::Status::FAILING:
|
||||
case Reporting::ReportStatus::FAILING:
|
||||
resultNotice_->SetText(rp->T("FeedbackSubmitFail", "Could not submit data to server. Try updating PPSSPP."));
|
||||
break;
|
||||
|
||||
case Reporting::Status::BUSY:
|
||||
case Reporting::ReportStatus::BUSY:
|
||||
default:
|
||||
// Can't update yet.
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user