Skip to content

Commit

Permalink
Merge pull request #19564 from hrydgard/further-fixes
Browse files Browse the repository at this point in the history
Some more fixes, Swedish translation improvements
  • Loading branch information
hrydgard authored Oct 29, 2024
2 parents fdab5cb + 084e273 commit 9333a25
Show file tree
Hide file tree
Showing 10 changed files with 59 additions and 75 deletions.
10 changes: 0 additions & 10 deletions Core/HLE/sceHttp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

// If http isn't loaded (seems unlikely), most functions should return SCE_KERNEL_ERROR_LIBRARY_NOTFOUND


// Could come in handy someday if we ever implement sceHttp* for real.
enum PSPHttpMethod {
PSP_HTTP_METHOD_GET,
Expand All @@ -36,15 +35,6 @@ class HTTPTemplate {
char useragent[512];
};

class HTTPConnection {

};

class HTTPRequest {

};


int sceHttpSetResolveRetry(int connectionID, int retryCount) {
ERROR_LOG(Log::sceNet, "UNIMPL sceHttpSetResolveRetry(%d, %d)", connectionID, retryCount);
return 0;
Expand Down
4 changes: 2 additions & 2 deletions Core/Reporting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,10 +225,10 @@ namespace Reporting
PurgeCRC();
}

// Returns the full host (e.g. report.ppsspp.org:80.)
// Returns the full host
std::string ServerHost() {
if (g_Config.sReportHost.compare("default") == 0)
return "report.ppsspp.org";
return "";
return g_Config.sReportHost;
}

Expand Down
3 changes: 3 additions & 0 deletions Core/System.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,9 @@ bool PSP_IsQuitting() {
}

void PSP_Shutdown() {
// Reduce the risk for weird races with the Windows GE debugger.
gpuDebug = nullptr;

Achievements::UnloadGame();

// Do nothing if we never inited.
Expand Down
4 changes: 2 additions & 2 deletions GPU/Common/SoftwareTransformCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -539,9 +539,9 @@ void SoftwareTransform::BuildDrawingParams(int prim, int vertexCount, u32 vertTy
// so the operations are exact.
bool pixelMapped = true;
const u16 *indsIn = (const u16 *)inds;
const float uscale = gstate_c.curTextureWidth;
const float vscale = gstate_c.curTextureHeight;
for (int t = 0; t < vertexCount; t += 3) {
float uscale = gstate_c.curTextureWidth;
float vscale = gstate_c.curTextureHeight;
struct { int a; int b; } pairs[] = { {0, 1}, {1, 2}, {2, 0} };
for (int i = 0; i < ARRAY_SIZE(pairs); i++) {
int a = indsIn[t + pairs[i].a];
Expand Down
2 changes: 1 addition & 1 deletion GPU/GLES/ShaderManagerGLES.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -975,7 +975,7 @@ enum class CacheDetectFlags {
};

#define CACHE_HEADER_MAGIC 0x83277592
#define CACHE_VERSION 36
#define CACHE_VERSION 37

struct CacheHeader {
uint32_t magic;
Expand Down
2 changes: 0 additions & 2 deletions GPU/GPU.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,6 @@ bool GPU_Init(GraphicsContext *ctx, Draw::DrawContext *draw) {
#endif

void GPU_Shutdown() {
// Reduce the risk for weird races with the Windows GE debugger.
gpuDebug = nullptr;

delete gpu;
gpu = nullptr;
Expand Down
2 changes: 1 addition & 1 deletion GPU/Vulkan/ShaderManagerVulkan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ enum class VulkanCacheDetectFlags {
};

#define CACHE_HEADER_MAGIC 0xff51f420
#define CACHE_VERSION 51
#define CACHE_VERSION 52

struct VulkanCacheHeader {
uint32_t magic;
Expand Down
20 changes: 8 additions & 12 deletions UI/ReportScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,13 @@ void CompatRatingChoice::SetupChoices() {
AddChoice(4, rp->T("Nothing"));
}

ReportScreen::ReportScreen(const Path &gamePath) // unused gamePath, after removing the background
ReportScreen::ReportScreen(const Path &gamePath)
: UIDialogScreen(), gamePath_(gamePath) {
enableReporting_ = Reporting::IsEnabled();
ratingEnabled_ = enableReporting_;
// Start computing a CRC immediately, we'll need it on submit.
// We won't enable the submit button until it's done.
Reporting::QueueCRC(gamePath_);
}

ScreenRenderFlags ReportScreen::render(ScreenRenderMode mode) {
Expand Down Expand Up @@ -296,7 +299,7 @@ void ReportScreen::CreateViews() {

if (tookScreenshot_ && !screenshotFilename_.empty()) {
leftColumnItems->Add(new CheckBox(&includeScreenshot_, rp->T("FeedbackIncludeScreen", "Include a screenshot")))->SetEnabledPtr(&enableReporting_);
screenshot_ = leftColumnItems->Add(new AsyncImageFileView(screenshotFilename_, IS_KEEP_ASPECT, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT, Margins(12, 0))));
screenshot_ = leftColumnItems->Add(new AsyncImageFileView(screenshotFilename_, IS_KEEP_ASPECT, new LinearLayoutParams(300, WRAP_CONTENT, Margins(12, 0))));
} else {
if (tookScreenshot_) {
includeScreenshot_ = false;
Expand All @@ -317,10 +320,9 @@ void ReportScreen::CreateViews() {

rightColumnItems->SetSpacing(0.0f);
rightColumnItems->Add(new Choice(rp->T("Open Browser")))->OnClick.Handle(this, &ReportScreen::HandleBrowser);
showCrcButton_ = new Choice(rp->T("Show disc CRC"));
rightColumnItems->Add(showCrcButton_)->OnClick.Handle(this, &ReportScreen::HandleShowCRC);
submit_ = new Choice(rp->T("Submit Feedback"));
rightColumnItems->Add(submit_)->OnClick.Handle(this, &ReportScreen::HandleSubmit);
submit_->SetEnabled(false); // Waiting for CRC
UpdateSubmit();
UpdateOverallDescription();

Expand Down Expand Up @@ -348,14 +350,14 @@ void ReportScreen::UpdateCRCInfo() {
if (Reporting::HasCRC(gamePath_)) {
std::string crc = StringFromFormat("%08X", Reporting::RetrieveCRC(gamePath_));
updated = ApplySafeSubstitutions(rp->T("FeedbackCRCValue", "Disc CRC: %1"), crc);
} else if (showCRC_) {
submit_->SetEnabled(true);
} else {
updated = rp->T("FeedbackCRCCalculating", "Disc CRC: Calculating...");
}

if (!updated.empty()) {
crcInfo_->SetText(updated);
crcInfo_->SetVisibility(V_VISIBLE);
showCrcButton_->SetEnabled(false);
}
}

Expand Down Expand Up @@ -405,12 +407,6 @@ EventReturn ReportScreen::HandleBrowser(EventParams &e) {
return EVENT_DONE;
}

EventReturn ReportScreen::HandleShowCRC(EventParams &e) {
Reporting::QueueCRC(gamePath_);
showCRC_ = true;
return EVENT_DONE;
}

ReportFinishScreen::ReportFinishScreen(const Path &gamePath, ReportingOverallScore score)
: UIDialogScreen(), gamePath_(gamePath), score_(score) {
}
Expand Down
3 changes: 0 additions & 3 deletions UI/ReportScreen.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,13 @@ class ReportScreen : public UIDialogScreen {
UI::EventReturn HandleChoice(UI::EventParams &e);
UI::EventReturn HandleSubmit(UI::EventParams &e);
UI::EventReturn HandleBrowser(UI::EventParams &e);
UI::EventReturn HandleShowCRC(UI::EventParams &e);
UI::EventReturn HandleReportingChange(UI::EventParams &e);

UI::Choice *submit_ = nullptr;
UI::View *screenshot_ = nullptr;
UI::TextView *reportingNotice_ = nullptr;
UI::TextView *overallDescription_ = nullptr;
UI::TextView *crcInfo_ = nullptr;
UI::Choice *showCrcButton_ = nullptr;
Path gamePath_;
Path screenshotFilename_;

Expand All @@ -74,7 +72,6 @@ class ReportScreen : public UIDialogScreen {
bool ratingEnabled_;
bool tookScreenshot_ = false;
bool includeScreenshot_ = true;
bool showCRC_ = false;
};

class ReportFinishScreen : public UIDialogScreen {
Expand Down
Loading

0 comments on commit 9333a25

Please sign in to comment.