diff --git a/CMakeLists.txt b/CMakeLists.txt index 4a9173ed37..90cd57ace1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1316,6 +1316,10 @@ if(ANDROID) endif() endif() +if (IOS) + set(nativeExtra ${nativeExtra} ${NativeAppSource}) +endif() + add_library(native STATIC ${nativeExtra} Common/Render/Text/draw_text_qt.cpp diff --git a/Common/GPU/OpenGL/GLRenderManager.h b/Common/GPU/OpenGL/GLRenderManager.h index 905fd70826..ff48306c3e 100644 --- a/Common/GPU/OpenGL/GLRenderManager.h +++ b/Common/GPU/OpenGL/GLRenderManager.h @@ -99,12 +99,23 @@ struct GLRProgramFlags { bool useClipDistance2 : 1; }; +// Unless you manage lifetimes in some smart way, +// your loc data for uniforms and samplers need to be in a struct +// derived from this, and passed into CreateProgram. +class GLRProgramLocData { +public: + virtual ~GLRProgramLocData() {} +}; + class GLRProgram { public: ~GLRProgram() { if (program) { glDeleteProgram(program); } + if (locData_) { + delete locData_; + } } struct Semantic { int location; @@ -127,6 +138,8 @@ public: std::vector semantics_; std::vector queries_; std::vector initialize_; + + GLRProgramLocData *locData_; bool use_clip_distance[8]{}; struct UniformInfo { @@ -148,6 +161,7 @@ public: } return loc; } + std::unordered_map uniformCache_; }; @@ -438,13 +452,14 @@ public: // not be an active render pass. GLRProgram *CreateProgram( std::vector shaders, std::vector semantics, std::vector queries, - std::vector initializers, const GLRProgramFlags &flags) { + std::vector initializers, GLRProgramLocData *locData, const GLRProgramFlags &flags) { GLRInitStep step{ GLRInitStepType::CREATE_PROGRAM }; _assert_(shaders.size() <= ARRAY_SIZE(step.create_program.shaders)); step.create_program.program = new GLRProgram(); step.create_program.program->semantics_ = semantics; step.create_program.program->queries_ = queries; step.create_program.program->initialize_ = initializers; + step.create_program.program->locData_ = locData; step.create_program.program->use_clip_distance[0] = flags.useClipDistance0; step.create_program.program->use_clip_distance[1] = flags.useClipDistance1; step.create_program.program->use_clip_distance[2] = flags.useClipDistance2; diff --git a/Common/GPU/OpenGL/thin3d_gl.cpp b/Common/GPU/OpenGL/thin3d_gl.cpp index b107f2f194..2536d2beea 100644 --- a/Common/GPU/OpenGL/thin3d_gl.cpp +++ b/Common/GPU/OpenGL/thin3d_gl.cpp @@ -261,6 +261,11 @@ bool OpenGLShaderModule::Compile(GLRenderManager *render, ShaderLanguage languag return true; } +struct PipelineLocData : GLRProgramLocData { + GLint samplerLocs_[MAX_TEXTURE_SLOTS]{}; + std::vector dynamicUniformLocs_; +}; + class OpenGLInputLayout : public InputLayout { public: OpenGLInputLayout(GLRenderManager *render) : render_(render) {} @@ -285,9 +290,10 @@ public: if (program_) { render_->DeleteProgram(program_); } + // DO NOT delete locs_ here, it's deleted by the render manager. } - bool LinkShaders(); + bool LinkShaders(const PipelineDesc &desc); GLuint prim = 0; std::vector shaders; @@ -296,12 +302,14 @@ public: AutoRef blend; AutoRef raster; + // Not owned! + PipelineLocData *locs_ = nullptr; + // TODO: Optimize by getting the locations first and putting in a custom struct UniformBufferDesc dynamicUniforms; - GLint samplerLocs_[MAX_TEXTURE_SLOTS]{}; - std::vector dynamicUniformLocs_; GLRProgram *program_ = nullptr; + // Allow using other sampler names than sampler0, sampler1 etc in shaders. // If not set, will default to those, though. Slice samplers_; @@ -1133,10 +1141,10 @@ Pipeline *OpenGLContext::CreateGraphicsPipeline(const PipelineDesc &desc, const } if (desc.uniformDesc) { pipeline->dynamicUniforms = *desc.uniformDesc; - pipeline->dynamicUniformLocs_.resize(desc.uniformDesc->uniforms.size()); } + pipeline->samplers_ = desc.samplers; - if (pipeline->LinkShaders()) { + if (pipeline->LinkShaders(desc)) { // Build the rest of the virtual pipeline object. pipeline->prim = primToGL[(int)desc.prim]; pipeline->depthStencil = (OpenGLDepthStencilState *)desc.depthStencil; @@ -1206,7 +1214,7 @@ ShaderModule *OpenGLContext::CreateShaderModule(ShaderStage stage, ShaderLanguag } } -bool OpenGLPipeline::LinkShaders() { +bool OpenGLPipeline::LinkShaders(const PipelineDesc &desc) { std::vector linkShaders; for (auto shaderModule : shaders) { if (shaderModule) { @@ -1237,32 +1245,38 @@ bool OpenGLPipeline::LinkShaders() { semantics.push_back({ SEM_POSITION, "a_position" }); semantics.push_back({ SEM_TEXCOORD0, "a_texcoord0" }); + locs_ = new PipelineLocData(); + locs_->dynamicUniformLocs_.resize(desc.uniformDesc->uniforms.size()); + std::vector queries; + int samplersToCheck; if (!samplers_.is_empty()) { for (int i = 0; i < (int)std::min((const uint32_t)samplers_.size(), MAX_TEXTURE_SLOTS); i++) { - queries.push_back({ &samplerLocs_[i], samplers_[i].name, true }); + queries.push_back({ &locs_->samplerLocs_[i], samplers_[i].name, true }); } + samplersToCheck = (int)samplers_.size(); } else { - queries.push_back({ &samplerLocs_[0], "sampler0" }); - queries.push_back({ &samplerLocs_[1], "sampler1" }); - queries.push_back({ &samplerLocs_[2], "sampler2" }); + queries.push_back({ &locs_->samplerLocs_[0], "sampler0" }); + queries.push_back({ &locs_->samplerLocs_[1], "sampler1" }); + queries.push_back({ &locs_->samplerLocs_[2], "sampler2" }); + samplersToCheck = 3; } _assert_(queries.size() <= MAX_TEXTURE_SLOTS); for (size_t i = 0; i < dynamicUniforms.uniforms.size(); ++i) { - queries.push_back({ &dynamicUniformLocs_[i], dynamicUniforms.uniforms[i].name }); + queries.push_back({ &locs_->dynamicUniformLocs_[i], dynamicUniforms.uniforms[i].name }); } std::vector initialize; for (int i = 0; i < MAX_TEXTURE_SLOTS; ++i) { - if (i < (int)samplers_.size()) { - initialize.push_back({ &samplerLocs_[i], 0, i }); + if (i < samplersToCheck) { + initialize.push_back({ &locs_->samplerLocs_[i], 0, i }); } else { - samplerLocs_[i] = -1; + locs_->samplerLocs_[i] = -1; } } GLRProgramFlags flags{}; - program_ = render_->CreateProgram(linkShaders, semantics, queries, initialize, flags); + program_ = render_->CreateProgram(linkShaders, semantics, queries, initialize, locs_, flags); return true; } @@ -1284,7 +1298,7 @@ void OpenGLContext::UpdateDynamicUniformBuffer(const void *ub, size_t size) { for (size_t i = 0; i < curPipeline_->dynamicUniforms.uniforms.size(); ++i) { const auto &uniform = curPipeline_->dynamicUniforms.uniforms[i]; - const GLint &loc = curPipeline_->dynamicUniformLocs_[i]; + const GLint &loc = curPipeline_->locs_->dynamicUniformLocs_[i]; const float *data = (const float *)((uint8_t *)ub + uniform.offset); switch (uniform.type) { case UniformType::FLOAT1: diff --git a/Common/UI/UIScreen.cpp b/Common/UI/UIScreen.cpp index 63b743d33a..d1623101d0 100644 --- a/Common/UI/UIScreen.cpp +++ b/Common/UI/UIScreen.cpp @@ -20,12 +20,17 @@ static const bool ClickDebug = false; UIScreen::UIScreen() : Screen() { + lastVertical_ = UseVerticalLayout(); } UIScreen::~UIScreen() { delete root_; } +bool UIScreen::UseVerticalLayout() const { + return dp_yres > dp_xres * 1.1f; +} + void UIScreen::DoRecreateViews() { if (recreateViews_) { std::lock_guard guard(screenManager()->inputLock_); @@ -60,6 +65,12 @@ void UIScreen::DoRecreateViews() { } void UIScreen::update() { + bool vertical = UseVerticalLayout(); + if (vertical != lastVertical_) { + RecreateViews(); + lastVertical_ = vertical; + } + DoRecreateViews(); if (root_) { diff --git a/Common/UI/UIScreen.h b/Common/UI/UIScreen.h index 1b25dc4231..d0f3dd322b 100644 --- a/Common/UI/UIScreen.h +++ b/Common/UI/UIScreen.h @@ -42,7 +42,8 @@ protected: virtual void CreateViews() = 0; virtual void DrawBackground(UIContext &dc) {} - virtual void RecreateViews() override { recreateViews_ = true; } + void RecreateViews() override { recreateViews_ = true; } + bool UseVerticalLayout() const; UI::ViewGroup *root_ = nullptr; Vec3 translation_ = Vec3(0.0f); @@ -54,6 +55,7 @@ private: void DoRecreateViews(); bool recreateViews_ = true; + bool lastVertical_; }; class UIDialogScreen : public UIScreen { @@ -280,7 +282,7 @@ public: UI::Event OnChoice; protected: - bool HasTitleBar() const { return false; } + bool HasTitleBar() const override { return false; } private: const ContextMenuItem *items_; diff --git a/Common/UI/View.h b/Common/UI/View.h index 0d52216771..1ab1ea5f68 100644 --- a/Common/UI/View.h +++ b/Common/UI/View.h @@ -287,6 +287,13 @@ struct Margins { int vert() const { return top + bottom; } + void SetAll(float f) { + int8_t i = (int)f; + top = i; + bottom = i; + left = i; + right = i; + } int8_t top; int8_t bottom; diff --git a/Common/UI/ViewGroup.cpp b/Common/UI/ViewGroup.cpp index f32bd6fd37..50398dac45 100644 --- a/Common/UI/ViewGroup.cpp +++ b/Common/UI/ViewGroup.cpp @@ -539,19 +539,19 @@ void LinearLayout::Measure(const UIContext &dc, MeasureSpec horiz, MeasureSpec v MeasureSpec v = vert; if (v.type == UNSPECIFIED && measuredHeight_ != 0.0f) v = MeasureSpec(AT_MOST, measuredHeight_); - view->Measure(dc, MeasureSpec(UNSPECIFIED, measuredWidth_), v - (float)margins.vert()); - if (horiz.type == AT_MOST && view->GetMeasuredWidth() + margins.horiz() > horiz.size - weightZeroSum) { + view->Measure(dc, MeasureSpec(UNSPECIFIED, measuredWidth_), v - (float)margins.vert() - (float)padding.vert()); + if (horiz.type == AT_MOST && view->GetMeasuredWidth() + margins.horiz() + padding.horiz() > horiz.size - weightZeroSum) { // Try again, this time with AT_MOST. - view->Measure(dc, horiz, v - (float)margins.vert()); + view->Measure(dc, horiz, v - (float)margins.vert() - (float)padding.vert()); } } else if (orientation_ == ORIENT_VERTICAL) { MeasureSpec h = horiz; if (h.type == UNSPECIFIED && measuredWidth_ != 0.0f) h = MeasureSpec(AT_MOST, measuredWidth_); - view->Measure(dc, h - (float)margins.horiz(), MeasureSpec(UNSPECIFIED, measuredHeight_)); - if (vert.type == AT_MOST && view->GetMeasuredHeight() + margins.vert() > vert.size - weightZeroSum) { + view->Measure(dc, h - (float)margins.horiz() - (float)padding.horiz(), MeasureSpec(UNSPECIFIED, measuredHeight_)); + if (vert.type == AT_MOST && view->GetMeasuredHeight() + margins.vert() + padding.horiz() > vert.size - weightZeroSum) { // Try again, this time with AT_MOST. - view->Measure(dc, h - (float)margins.horiz(), vert); + view->Measure(dc, h - (float)margins.horiz() - (float)padding.horiz(), vert); } } @@ -575,12 +575,12 @@ void LinearLayout::Measure(const UIContext &dc, MeasureSpec horiz, MeasureSpec v } } - weightZeroSum += spacing_ * (numVisible - 1); + weightZeroSum += spacing_ * (numVisible - 1); // +(orientation_ == ORIENT_HORIZONTAL) ? padding.horiz() : padding.vert(); // Alright, got the sum. Let's take the remaining space after the fixed-size views, // and distribute among the weighted ones. if (orientation_ == ORIENT_HORIZONTAL) { - MeasureBySpec(layoutParams_->width, weightZeroSum, horiz, &measuredWidth_); + MeasureBySpec(layoutParams_->width, weightZeroSum + padding.horiz(), horiz, &measuredWidth_); // If we've got stretch, allow growing to fill the parent. float allowedWidth = measuredWidth_; @@ -588,7 +588,7 @@ void LinearLayout::Measure(const UIContext &dc, MeasureSpec horiz, MeasureSpec v allowedWidth = horiz.size; } - float usedWidth = 0.0f; + float usedWidth = 0.0f + padding.horiz(); // Redistribute the stretchy ones! and remeasure the children! for (View *view : views_) { @@ -615,7 +615,7 @@ void LinearLayout::Measure(const UIContext &dc, MeasureSpec horiz, MeasureSpec v if (horiz.type == EXACTLY) { h.type = EXACTLY; } - view->Measure(dc, h, v - (float)margins.vert()); + view->Measure(dc, h, v - (float)margins.vert() - (float)padding.vert()); usedWidth += view->GetMeasuredWidth(); maxOther = std::max(maxOther, view->GetMeasuredHeight() + margins.vert()); } @@ -626,9 +626,9 @@ void LinearLayout::Measure(const UIContext &dc, MeasureSpec horiz, MeasureSpec v } // Measure here in case maxOther moved (can happen due to word wrap.) - MeasureBySpec(layoutParams_->height, maxOther, vert, &measuredHeight_); + MeasureBySpec(layoutParams_->height, maxOther + padding.vert(), vert, &measuredHeight_); } else { - MeasureBySpec(layoutParams_->height, weightZeroSum, vert, &measuredHeight_); + MeasureBySpec(layoutParams_->height, weightZeroSum + padding.vert(), vert, &measuredHeight_); // If we've got stretch, allow growing to fill the parent. float allowedHeight = measuredHeight_; @@ -636,7 +636,7 @@ void LinearLayout::Measure(const UIContext &dc, MeasureSpec horiz, MeasureSpec v allowedHeight = vert.size; } - float usedHeight = 0.0f; + float usedHeight = 0.0f + padding.vert(); // Redistribute the stretchy ones! and remeasure the children! for (View *view : views_) { @@ -663,7 +663,7 @@ void LinearLayout::Measure(const UIContext &dc, MeasureSpec horiz, MeasureSpec v if (vert.type == EXACTLY) { v.type = EXACTLY; } - view->Measure(dc, h - (float)margins.horiz(), v); + view->Measure(dc, h - (float)margins.horiz() - (float)padding.horiz(), v); usedHeight += view->GetMeasuredHeight(); maxOther = std::max(maxOther, view->GetMeasuredWidth() + margins.horiz()); } @@ -674,7 +674,7 @@ void LinearLayout::Measure(const UIContext &dc, MeasureSpec horiz, MeasureSpec v } // Measure here in case maxOther moved (can happen due to word wrap.) - MeasureBySpec(layoutParams_->width, maxOther, horiz, &measuredWidth_); + MeasureBySpec(layoutParams_->width, maxOther + padding.horiz(), horiz, &measuredWidth_); } } @@ -686,13 +686,13 @@ void LinearLayout::Layout() { float pos; if (orientation_ == ORIENT_HORIZONTAL) { - pos = bounds.x; - itemBounds.y = bounds.y; - itemBounds.h = measuredHeight_; + pos = bounds.x + padding.left; + itemBounds.y = bounds.y + padding.top; + itemBounds.h = measuredHeight_ - padding.vert(); } else { - pos = bounds.y; - itemBounds.x = bounds.x; - itemBounds.w = measuredWidth_; + pos = bounds.y + padding.top; + itemBounds.x = bounds.x + padding.left; + itemBounds.w = measuredWidth_ - padding.horiz(); } for (size_t i = 0; i < views_.size(); i++) { @@ -928,6 +928,8 @@ void ScrollView::Draw(UIContext &dc) { } dc.PushScissor(bounds_); + dc.FillRect(bg_, bounds_); + // For debugging layout issues, this can be useful. // dc.FillRect(Drawable(0x60FF00FF), bounds_); views_[0]->Draw(dc); diff --git a/Common/UI/ViewGroup.h b/Common/UI/ViewGroup.h index 78c42e84b1..d408548b69 100644 --- a/Common/UI/ViewGroup.h +++ b/Common/UI/ViewGroup.h @@ -106,6 +106,7 @@ protected: // It simply centers the child view. class FrameLayout : public ViewGroup { public: + FrameLayout(LayoutParams *layoutParams = nullptr) : ViewGroup(layoutParams) {} void Measure(const UIContext &dc, MeasureSpec horiz, MeasureSpec vert) override; void Layout() override; }; @@ -193,6 +194,7 @@ public: spacing_ = spacing; } std::string DescribeLog() const override { return (orientation_ == ORIENT_HORIZONTAL ? "LinearLayoutHoriz: " : "LinearLayoutVert: ") + View::DescribeLog(); } + Margins padding; protected: Orientation orientation_; diff --git a/Core/Compatibility.cpp b/Core/Compatibility.cpp index deba3981bd..c4b287387d 100644 --- a/Core/Compatibility.cpp +++ b/Core/Compatibility.cpp @@ -123,6 +123,7 @@ void Compatibility::CheckSettings(IniFile &iniFile, const std::string &gameID) { CheckSetting(iniFile, gameID, "EnglishOrJapaneseOnly", &flags_.EnglishOrJapaneseOnly); CheckSetting(iniFile, gameID, "OldAdrenoPixelDepthRoundingGL", &flags_.OldAdrenoPixelDepthRoundingGL); CheckSetting(iniFile, gameID, "ForceCircleButtonConfirm", &flags_.ForceCircleButtonConfirm); + CheckSetting(iniFile, gameID, "DisallowFramebufferAtOffset", &flags_.DisallowFramebufferAtOffset); } void Compatibility::CheckVRSettings(IniFile &iniFile, const std::string &gameID) { diff --git a/Core/Compatibility.h b/Core/Compatibility.h index 29ad3a701a..5f0796afc5 100644 --- a/Core/Compatibility.h +++ b/Core/Compatibility.h @@ -94,6 +94,7 @@ struct CompatFlags { bool EnglishOrJapaneseOnly; bool OldAdrenoPixelDepthRoundingGL; bool ForceCircleButtonConfirm; + bool DisallowFramebufferAtOffset; }; struct VRCompat { diff --git a/GPU/Common/FramebufferManagerCommon.cpp b/GPU/Common/FramebufferManagerCommon.cpp index 88c27b03a3..613ab0a157 100644 --- a/GPU/Common/FramebufferManagerCommon.cpp +++ b/GPU/Common/FramebufferManagerCommon.cpp @@ -429,7 +429,7 @@ VirtualFramebuffer *FramebufferManagerCommon::DoSetRenderFrameBuffer(Framebuffer vfb->height = drawing_height; } break; - } else if (v->fb_stride == params.fb_stride && v->fb_format == params.fb_format && !PSP_CoreParameter().compat.flags().SplitFramebufferMargin) { + } else if (!PSP_CoreParameter().compat.flags().DisallowFramebufferAtOffset && v->fb_stride == params.fb_stride && v->fb_format == params.fb_format && !PSP_CoreParameter().compat.flags().SplitFramebufferMargin) { u32 v_fb_first_line_end_ptr = v->fb_address + v->fb_stride * bpp; u32 v_fb_end_ptr = v->fb_address + v->fb_stride * v->height * bpp; diff --git a/GPU/Common/PostShader.cpp b/GPU/Common/PostShader.cpp index 636c1b39e8..a29525b2f4 100644 --- a/GPU/Common/PostShader.cpp +++ b/GPU/Common/PostShader.cpp @@ -250,6 +250,16 @@ void ReloadAllPostShaderInfo(Draw::DrawContext *draw) { LoadPostShaderInfo(draw, directories); } +void RemoveUnknownPostShaders(std::vector *names) { + for (auto iter = names->begin(); iter != names->end(); ) { + if (GetPostShaderInfo(*iter) == nullptr) { + iter = names->erase(iter); + } else { + ++iter; + } + } +} + const ShaderInfo *GetPostShaderInfo(const std::string &name) { for (size_t i = 0; i < shaderInfo.size(); i++) { if (shaderInfo[i].section == name) @@ -314,3 +324,25 @@ const TextureShaderInfo *GetTextureShaderInfo(const std::string &name) { const std::vector &GetAllTextureShaderInfo() { return textureShaderInfo; } + +void FixPostShaderOrder(std::vector *names) { + // There's one rule only that we enforce - only one shader can use UsePreviousFrame, + // and it has to be the last one. So we simply remove any we find from the list, + // and then append it to the end if there is one. + std::string prevFrameShader; + for (auto iter = names->begin(); iter != names->end(); ) { + const ShaderInfo *info = GetPostShaderInfo(*iter); + if (info) { + if (info->usePreviousFrame) { + prevFrameShader = *iter; + iter = names->erase(iter++); + continue; + } + } + ++iter; + } + + if (!prevFrameShader.empty()) { + names->push_back(prevFrameShader); + } +} diff --git a/GPU/Common/PostShader.h b/GPU/Common/PostShader.h index 06fc69a159..882290d49f 100644 --- a/GPU/Common/PostShader.h +++ b/GPU/Common/PostShader.h @@ -114,3 +114,9 @@ const std::vector &GetAllPostShaderInfo(); const TextureShaderInfo *GetTextureShaderInfo(const std::string &name); const std::vector &GetAllTextureShaderInfo(); +void RemoveUnknownPostShaders(std::vector *names); + +// Call this any time you alter the postshader list. It makes sure +// that "usePrevFrame" shaders are at the end, and that there's only one. +// It'll also enforce any similar future rules. +void FixPostShaderOrder(std::vector *names); diff --git a/GPU/Common/PresentationCommon.cpp b/GPU/Common/PresentationCommon.cpp index 6f69f881fa..00975e72d6 100644 --- a/GPU/Common/PresentationCommon.cpp +++ b/GPU/Common/PresentationCommon.cpp @@ -879,6 +879,8 @@ void PresentationCommon::CalculateRenderResolution(int *width, int *height, int std::vector shaderInfo; if (!g_Config.vPostShaderNames.empty()) { ReloadAllPostShaderInfo(draw_); + RemoveUnknownPostShaders(&g_Config.vPostShaderNames); + FixPostShaderOrder(&g_Config.vPostShaderNames); shaderInfo = GetFullPostShadersChain(g_Config.vPostShaderNames); } diff --git a/GPU/Common/TextureCacheCommon.cpp b/GPU/Common/TextureCacheCommon.cpp index 9d0b46db2e..e0c2d4667b 100644 --- a/GPU/Common/TextureCacheCommon.cpp +++ b/GPU/Common/TextureCacheCommon.cpp @@ -690,6 +690,10 @@ bool TextureCacheCommon::GetBestFramebufferCandidate(const TextureDefinition &en relevancy -= 2; } + if (candidate.match.xOffset != 0 && PSP_CoreParameter().compat.flags().DisallowFramebufferAtOffset) { + continue; + } + // Avoid binding as texture the framebuffer we're rendering to. // In Killzone, we split the framebuffer but the matching algorithm can still pick the wrong one, // which this avoids completely. @@ -714,6 +718,7 @@ bool TextureCacheCommon::GetBestFramebufferCandidate(const TextureDefinition &en if (i != candidates.size() - 1) cands += "\n"; } + cands += "\n"; WARN_LOG(G3D, "GetFramebufferCandidates: Multiple (%d) candidate framebuffers. texaddr: %08x offset: %d (%dx%d stride %d, %s):\n%s", (int)candidates.size(), @@ -1551,15 +1556,16 @@ static CheckAlphaResult DecodeDXTBlocks(uint8_t *out, int outPitch, uint32_t tex u32 blockIndex = (y / 4) * (bufw / 4); int blockHeight = std::min(h - y, 4); for (int x = 0; x < minw; x += 4) { + int blockWidth = std::min(minw - x, 4); switch (n) { case 1: - DecodeDXT1Block(dst + outPitch32 * y + x, (const DXT1Block *)src + blockIndex, outPitch32, blockHeight, &alphaSum); + DecodeDXT1Block(dst + outPitch32 * y + x, (const DXT1Block *)src + blockIndex, outPitch32, blockWidth, blockHeight, &alphaSum); break; case 3: - DecodeDXT3Block(dst + outPitch32 * y + x, (const DXT3Block *)src + blockIndex, outPitch32, blockHeight); + DecodeDXT3Block(dst + outPitch32 * y + x, (const DXT3Block *)src + blockIndex, outPitch32, blockWidth, blockHeight); break; case 5: - DecodeDXT5Block(dst + outPitch32 * y + x, (const DXT5Block *)src + blockIndex, outPitch32, blockHeight); + DecodeDXT5Block(dst + outPitch32 * y + x, (const DXT5Block *)src + blockIndex, outPitch32, blockWidth, blockHeight); break; } blockIndex++; @@ -1668,7 +1674,9 @@ CheckAlphaResult TextureCacheCommon::DecodeTextureLevel(u8 *out, int outPitch, G case GE_CMODE_16BIT_ABGR5551: case GE_CMODE_16BIT_ABGR4444: { - if (clutAlphaLinear_ && mipmapShareClut && !expandTo32bit) { + // The w > 1 check is to not need a case that handles a single pixel + // in DeIndexTexture4Optimal. + if (clutAlphaLinear_ && mipmapShareClut && !expandTo32bit && w >= 4) { // We don't bother with fullalpha here (clutAlphaLinear_) // Here, reverseColors means the CLUT is already reversed. if (reverseColors) { diff --git a/GPU/Common/TextureDecoder.cpp b/GPU/Common/TextureDecoder.cpp index 22e45b151b..a12be66cb9 100644 --- a/GPU/Common/TextureDecoder.cpp +++ b/GPU/Common/TextureDecoder.cpp @@ -421,9 +421,9 @@ class DXTDecoder { public: inline void DecodeColors(const DXT1Block *src, bool ignore1bitAlpha); inline void DecodeAlphaDXT5(const DXT5Block *src); - inline void WriteColorsDXT1(u32 *dst, const DXT1Block *src, int pitch, int height); - inline void WriteColorsDXT3(u32 *dst, const DXT3Block *src, int pitch, int height); - inline void WriteColorsDXT5(u32 *dst, const DXT5Block *src, int pitch, int height); + inline void WriteColorsDXT1(u32 *dst, const DXT1Block *src, int pitch, int width, int height); + inline void WriteColorsDXT3(u32 *dst, const DXT3Block *src, int pitch, int width, int height); + inline void WriteColorsDXT5(u32 *dst, const DXT5Block *src, int pitch, int width, int height); bool AnyNonFullAlpha() const { return anyNonFullAlpha_; } @@ -507,11 +507,11 @@ void DXTDecoder::DecodeAlphaDXT5(const DXT5Block *src) { } } -void DXTDecoder::WriteColorsDXT1(u32 *dst, const DXT1Block *src, int pitch, int height) { +void DXTDecoder::WriteColorsDXT1(u32 *dst, const DXT1Block *src, int pitch, int width, int height) { bool anyColor3 = false; for (int y = 0; y < height; y++) { int colordata = src->lines[y]; - for (int x = 0; x < 4; x++) { + for (int x = 0; x < width; x++) { int col = colordata & 3; if (col == 3) { anyColor3 = true; @@ -527,11 +527,11 @@ void DXTDecoder::WriteColorsDXT1(u32 *dst, const DXT1Block *src, int pitch, int } } -void DXTDecoder::WriteColorsDXT3(u32 *dst, const DXT3Block *src, int pitch, int height) { +void DXTDecoder::WriteColorsDXT3(u32 *dst, const DXT3Block *src, int pitch, int width, int height) { for (int y = 0; y < height; y++) { int colordata = src->color.lines[y]; u32 alphadata = src->alphaLines[y]; - for (int x = 0; x < 4; x++) { + for (int x = 0; x < width; x++) { dst[x] = colors_[colordata & 3] | (alphadata << 28); colordata >>= 2; alphadata >>= 4; @@ -540,13 +540,13 @@ void DXTDecoder::WriteColorsDXT3(u32 *dst, const DXT3Block *src, int pitch, int } } -void DXTDecoder::WriteColorsDXT5(u32 *dst, const DXT5Block *src, int pitch, int height) { +void DXTDecoder::WriteColorsDXT5(u32 *dst, const DXT5Block *src, int pitch, int width, int height) { // 48 bits, 3 bit index per pixel, 12 bits per line. u64 alphadata = ((u64)(u16)src->alphadata1 << 32) | (u32)src->alphadata2; for (int y = 0; y < height; y++) { int colordata = src->color.lines[y]; - for (int x = 0; x < 4; x++) { + for (int x = 0; x < width; x++) { dst[x] = colors_[colordata & 3] | (alpha_[alphadata & 7] << 24); colordata >>= 2; alphadata >>= 3; @@ -619,24 +619,24 @@ uint32_t GetDXT5Texel(const DXT5Block *src, int x, int y) { } // This could probably be done faster by decoding two or four blocks at a time with SSE/NEON. -void DecodeDXT1Block(u32 *dst, const DXT1Block *src, int pitch, int height, u32 *alpha) { +void DecodeDXT1Block(u32 *dst, const DXT1Block *src, int pitch, int width, int height, u32 *alpha) { DXTDecoder dxt; dxt.DecodeColors(src, false); - dxt.WriteColorsDXT1(dst, src, pitch, height); + dxt.WriteColorsDXT1(dst, src, pitch, width, height); *alpha &= dxt.AnyNonFullAlpha() ? 0 : 1; } -void DecodeDXT3Block(u32 *dst, const DXT3Block *src, int pitch, int height) { +void DecodeDXT3Block(u32 *dst, const DXT3Block *src, int pitch, int width, int height) { DXTDecoder dxt; dxt.DecodeColors(&src->color, true); - dxt.WriteColorsDXT3(dst, src, pitch, height); + dxt.WriteColorsDXT3(dst, src, pitch, width, height); } -void DecodeDXT5Block(u32 *dst, const DXT5Block *src, int pitch, int height) { +void DecodeDXT5Block(u32 *dst, const DXT5Block *src, int pitch, int width, int height) { DXTDecoder dxt; dxt.DecodeColors(&src->color, true); dxt.DecodeAlphaDXT5(src); - dxt.WriteColorsDXT5(dst, src, pitch, height); + dxt.WriteColorsDXT5(dst, src, pitch, width, height); } #ifdef _M_SSE diff --git a/GPU/Common/TextureDecoder.h b/GPU/Common/TextureDecoder.h index 7a15a32adc..ad54815ff7 100644 --- a/GPU/Common/TextureDecoder.h +++ b/GPU/Common/TextureDecoder.h @@ -65,9 +65,9 @@ struct DXT5Block { u8 alpha1; u8 alpha2; }; -void DecodeDXT1Block(u32 *dst, const DXT1Block *src, int pitch, int height, u32 *alpha); -void DecodeDXT3Block(u32 *dst, const DXT3Block *src, int pitch, int height); -void DecodeDXT5Block(u32 *dst, const DXT5Block *src, int pitch, int height); +void DecodeDXT1Block(u32 *dst, const DXT1Block *src, int pitch, int width, int height, u32 *alpha); +void DecodeDXT3Block(u32 *dst, const DXT3Block *src, int pitch, int width, int height); +void DecodeDXT5Block(u32 *dst, const DXT5Block *src, int pitch, int width, int height); uint32_t GetDXT1Texel(const DXT1Block *src, int x, int y); uint32_t GetDXT3Texel(const DXT3Block *src, int x, int y); @@ -163,22 +163,36 @@ inline void DeIndexTexture4(/*WRITEONLY*/ ClutT *dest, const u8 *indexed, int le ClutT alphaSum = (ClutT)(-1); if (nakedIndex) { - for (int i = 0; i < length; i += 2) { + while (length >= 2) { u8 index = *indexed++; ClutT color0 = clut[index & 0xf]; ClutT color1 = clut[index >> 4]; - dest[i + 0] = color0; - dest[i + 1] = color1; + *dest++ = color0; + *dest++ = color1; alphaSum &= color0 & color1; + length -= 2; + } + if (length) { // Last pixel. Can really only happen in 1xY textures, but making this work generically. + u8 index = *indexed++; + ClutT color0 = clut[index & 0xf]; + *dest = color0; + alphaSum &= color0; } } else { - for (int i = 0; i < length; i += 2) { + while (length >= 2) { u8 index = *indexed++; ClutT color0 = clut[gstate.transformClutIndex((index >> 0) & 0xf)]; ClutT color1 = clut[gstate.transformClutIndex((index >> 4) & 0xf)]; - dest[i + 0] = color0; - dest[i + 1] = color1; + *dest++ = color0; + *dest++ = color1; alphaSum &= color0 & color1; + length -= 2; + } + if (length) { + u8 index = *indexed++; + ClutT color0 = clut[gstate.transformClutIndex((index >> 0) & 0xf)]; + *dest = color0; + alphaSum &= color0; } } @@ -187,10 +201,15 @@ inline void DeIndexTexture4(/*WRITEONLY*/ ClutT *dest, const u8 *indexed, int le template inline void DeIndexTexture4Optimal(ClutT *dest, const u8 *indexed, int length, ClutT color) { - for (int i = 0; i < length; i += 2) { + while (length >= 2) { u8 index = *indexed++; - dest[i + 0] = color | ((index >> 0) & 0xf); - dest[i + 1] = color | ((index >> 4) & 0xf); + *dest++ = color | ((index >> 0) & 0xf); + *dest++ = color | ((index >> 4) & 0xf); + length -= 2; + } + if (length) { + u8 index = *indexed++; + *dest++ = color | ((index >> 0) & 0xf); } } diff --git a/GPU/GLES/ShaderManagerGLES.cpp b/GPU/GLES/ShaderManagerGLES.cpp index cc5211a19f..fa5cc0d2d4 100644 --- a/GPU/GLES/ShaderManagerGLES.cpp +++ b/GPU/GLES/ShaderManagerGLES.cpp @@ -204,7 +204,7 @@ LinkedShader::LinkedShader(GLRenderManager *render, VShaderID VSID, Shader *vs, flags.useClipDistance0 = true; } - program = render->CreateProgram(shaders, semantics, queries, initialize, flags); + program = render->CreateProgram(shaders, semantics, queries, initialize, nullptr, flags); // The rest, use the "dirty" mechanism. dirtyUniforms = DIRTY_ALL_UNIFORMS; diff --git a/GPU/Math3D.h b/GPU/Math3D.h index d6514aa1b0..b3a94ba56c 100644 --- a/GPU/Math3D.h +++ b/GPU/Math3D.h @@ -898,7 +898,8 @@ inline void Vec3ByMatrix43(float vecOut[3], const float v[3], const float m[12]) vecOut[1] = vectorGetByIndex<1>(sum); vecOut[2] = vectorGetByIndex<2>(sum); #elif PPSSPP_ARCH(ARM64_NEON) - float32x4_t sum = Vec3ByMatrix43Internal(vld1q_f32(v), m); + float vecIn[4] = {v[0], v[1], v[2], 1.0f}; + float32x4_t sum = Vec3ByMatrix43Internal(vld1q_f32(vecIn), m); vecOut[0] = vgetq_lane_f32(sum, 0); vecOut[1] = vgetq_lane_f32(sum, 1); vecOut[2] = vgetq_lane_f32(sum, 2); @@ -957,7 +958,8 @@ inline void Vec3ByMatrix44(float vecOut[4], const float v[3], const float m[16]) __m128 sum = Vec3ByMatrix44Internal(x, y, z, m); _mm_storeu_ps(vecOut, sum); #elif PPSSPP_ARCH(ARM64_NEON) - float32x4_t sum = Vec3ByMatrix44Internal(vld1q_f32(v), m); + float vecIn[4] = {v[0], v[1], v[2], 1.0f}; + float32x4_t sum = Vec3ByMatrix44Internal(vld1q_f32(vecIn), m); vst1q_f32(vecOut, sum); #else vecOut[0] = v[0] * m[0] + v[1] * m[4] + v[2] * m[8] + m[12]; diff --git a/Qt/mainwindow.cpp b/Qt/mainwindow.cpp index ff0947f573..26707a76e2 100644 --- a/Qt/mainwindow.cpp +++ b/Qt/mainwindow.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include #include @@ -26,7 +27,14 @@ MainWindow::MainWindow(QWidget *parent, bool fullscreen) : nextState(CORE_POWERDOWN), lastUIState(UISTATE_MENU) { +#if defined(ASSETS_DIR) + if (QFile::exists(ASSETS_DIR "icon_regular_72.png")) + setWindowIcon(QIcon(ASSETS_DIR "icon_regular_72.png")); + else + setWindowIcon(QIcon(qApp->applicationDirPath() + "/assets/icon_regular_72.png")); +#else setWindowIcon(QIcon(qApp->applicationDirPath() + "/assets/icon_regular_72.png")); +#endif SetGameTitle(""); emugl = new MainUI(this); diff --git a/SDL/SDLMain.cpp b/SDL/SDLMain.cpp index b09a64d5dd..4158600698 100644 --- a/SDL/SDLMain.cpp +++ b/SDL/SDLMain.cpp @@ -569,9 +569,10 @@ int main(int argc, char *argv[]) { Uint32 mode = 0; for (int i = 1; i < argc; i++) { - if (!strcmp(argv[i],"--fullscreen")) + if (!strcmp(argv[i],"--fullscreen")) { mode |= SDL_WINDOW_FULLSCREEN_DESKTOP; - else if (set_xres == -2) + g_Config.iForceFullScreen = 1; + } else if (set_xres == -2) set_xres = parseInt(argv[i]); else if (set_yres == -2) set_yres = parseInt(argv[i]); @@ -657,7 +658,8 @@ int main(int argc, char *argv[]) { if (mode & SDL_WINDOW_FULLSCREEN_DESKTOP) { pixel_xres = g_DesktopWidth; pixel_yres = g_DesktopHeight; - g_Config.iForceFullScreen = 1; + if (g_Config.iForceFullScreen == -1) + g_Config.bFullScreen = true; } else { // set a sensible default resolution (2x) pixel_xres = 480 * 2 * set_scale; @@ -665,7 +667,8 @@ int main(int argc, char *argv[]) { if (portrait) { std::swap(pixel_xres, pixel_yres); } - g_Config.iForceFullScreen = 0; + if (g_Config.iForceFullScreen == -1) + g_Config.bFullScreen = false; } set_dpi = 1.0f / set_dpi; @@ -770,7 +773,13 @@ int main(int argc, char *argv[]) { SDL_SetWindowTitle(window, (app_name_nice + " " + PPSSPP_GIT_VERSION).c_str()); char iconPath[PATH_MAX]; +#if defined(ASSETS_DIR) + snprintf(iconPath, PATH_MAX, "%sicon_regular_72.png", ASSETS_DIR); + if (access(iconPath, F_OK) != 0) + snprintf(iconPath, PATH_MAX, "%sassets/icon_regular_72.png", SDL_GetBasePath() ? SDL_GetBasePath() : ""); +#else snprintf(iconPath, PATH_MAX, "%sassets/icon_regular_72.png", SDL_GetBasePath() ? SDL_GetBasePath() : ""); +#endif int width = 0, height = 0; unsigned char *imageData; if (pngLoad(iconPath, &width, &height, &imageData) == 1) { diff --git a/UI/DisplayLayoutScreen.cpp b/UI/DisplayLayoutScreen.cpp index 432e3b5eaa..b1612c3c2f 100644 --- a/UI/DisplayLayoutScreen.cpp +++ b/UI/DisplayLayoutScreen.cpp @@ -152,6 +152,7 @@ void DisplayLayoutScreen::dialogFinished(const Screen *dialog, DialogResult resu UI::EventReturn DisplayLayoutScreen::OnPostProcShaderChange(UI::EventParams &e) { // Remove the virtual "Off" entry. TODO: Get rid of it generally. g_Config.vPostShaderNames.erase(std::remove(g_Config.vPostShaderNames.begin(), g_Config.vPostShaderNames.end(), "Off"), g_Config.vPostShaderNames.end()); + FixPostShaderOrder(&g_Config.vPostShaderNames); NativeMessageReceived("gpu_configChanged", ""); NativeMessageReceived("gpu_renderResized", ""); // To deal with shaders that can change render resolution like upscaling. @@ -199,24 +200,43 @@ void DisplayLayoutScreen::CreateViews() { root_ = new AnchorLayout(new LayoutParams(FILL_PARENT, FILL_PARENT)); + bool vertical = bounds.h > bounds.w; + // Make it so that a touch can only affect one view. Makes manipulating the background through the buttons // impossible. root_->SetExclusiveTouch(true); - ScrollView *leftScrollView = new ScrollView(ORIENT_VERTICAL, new AnchorLayoutParams(400.0f, FILL_PARENT, 10.f, 10.f, NONE, 10.f, false)); - ViewGroup *leftColumn = new LinearLayout(ORIENT_VERTICAL); - leftScrollView->Add(leftColumn); - leftScrollView->SetClickableBackground(true); - root_->Add(leftScrollView); + LinearLayout *leftColumn; + if (!vertical) { + ScrollView *leftScrollView = new ScrollView(ORIENT_VERTICAL, new AnchorLayoutParams(420.0f, FILL_PARENT, 0.f, 0.f, NONE, 0.f, false)); + leftColumn = new LinearLayout(ORIENT_VERTICAL); + leftColumn->padding.SetAll(8.0f); + leftScrollView->Add(leftColumn); + leftScrollView->SetClickableBackground(true); + root_->Add(leftScrollView); + } - ScrollView *rightScrollView = new ScrollView(ORIENT_VERTICAL, new AnchorLayoutParams(300.0f, FILL_PARENT, NONE, 10.f, 10.f, 10.f, false)); - ViewGroup *rightColumn = new LinearLayout(ORIENT_VERTICAL); + ScrollView *rightScrollView = new ScrollView(ORIENT_VERTICAL, new AnchorLayoutParams(300.0f, FILL_PARENT, NONE, 0.f, 0.f, 0.f, false)); + LinearLayout *rightColumn = new LinearLayout(ORIENT_VERTICAL); + rightColumn->padding.SetAll(8.0f); rightScrollView->Add(rightColumn); rightScrollView->SetClickableBackground(true); root_->Add(rightScrollView); - LinearLayout *bottomControls = new LinearLayout(ORIENT_HORIZONTAL, new AnchorLayoutParams(NONE, NONE, NONE, 10.0f, false)); - root_->Add(bottomControls); + LinearLayout *bottomControls; + if (vertical) { + bottomControls = new LinearLayout(ORIENT_HORIZONTAL); + rightColumn->Add(bottomControls); + leftColumn = rightColumn; + } else { + bottomControls = new LinearLayout(ORIENT_HORIZONTAL, new AnchorLayoutParams(NONE, NONE, NONE, 10.0f, false)); + root_->Add(bottomControls); + } + + // Set backgrounds for readability + Drawable backgroundWithAlpha(GetBackgroundColorWithAlpha(*screenManager()->getUIContext())); + leftColumn->SetBG(backgroundWithAlpha); + rightColumn->SetBG(backgroundWithAlpha); if (!IsVREnabled()) { auto stretch = new CheckBox(&g_Config.bDisplayStretch, gr->T("Stretch")); @@ -259,6 +279,10 @@ void DisplayLayoutScreen::CreateViews() { back->OnClick.Handle(this, &UIScreen::OnBack); rightColumn->Add(back); + if (vertical) { + leftColumn->Add(new Spacer(24.0f)); + } + static const char *bufFilters[] = { "Linear", "Nearest", }; leftColumn->Add(new PopupMultiChoice(&g_Config.iBufFilter, gr->T("Screen Scaling Filter"), bufFilters, 1, ARRAY_SIZE(bufFilters), gr->GetName(), screenManager())); @@ -273,7 +297,13 @@ void DisplayLayoutScreen::CreateViews() { leftColumn->Add(new ItemHeader(gr->T("Postprocessing shaders"))); std::set alreadyAddedShader; - settingsVisible_.resize(g_Config.vPostShaderNames.size()); + // If there's a single post shader and we're just entering the dialog, + // auto-open the settings. + if (settingsVisible_.empty() && g_Config.vPostShaderNames.size() == 1) { + settingsVisible_.push_back(true); + } else if (settingsVisible_.size() < g_Config.vPostShaderNames.size()) { + settingsVisible_.resize(g_Config.vPostShaderNames.size()); + } static ContextMenuItem postShaderContextMenu[] = { { "Move Up", "I_ARROW_UP" }, @@ -341,7 +371,9 @@ void DisplayLayoutScreen::CreateViews() { moreButton->OnClick.Add([=](EventParams &e) -> UI::EventReturn { PopupContextMenuScreen *contextMenu = new UI::PopupContextMenuScreen(postShaderContextMenu, ARRAY_SIZE(postShaderContextMenu), di.get(), moreButton); screenManager()->push(contextMenu); - contextMenu->SetEnabled(0, i > 0); + const ShaderInfo *info = GetPostShaderInfo(g_Config.vPostShaderNames[i]); + bool usesLastFrame = info ? info->usePreviousFrame : false; + contextMenu->SetEnabled(0, i > 0 && !usesLastFrame); contextMenu->SetEnabled(1, i < g_Config.vPostShaderNames.size() - 1); contextMenu->OnChoice.Add([=](EventParams &e) -> UI::EventReturn { switch (e.a) { @@ -357,6 +389,7 @@ void DisplayLayoutScreen::CreateViews() { default: return UI::EVENT_DONE; } + FixPostShaderOrder(&g_Config.vPostShaderNames); NativeMessageReceived("gpu_configChanged", ""); RecreateViews(); return UI::EVENT_DONE; diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index 15d1987f02..3e2a3229a2 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -92,15 +92,10 @@ extern AndroidAudioState *g_audioState; GameSettingsScreen::GameSettingsScreen(const Path &gamePath, std::string gameID, bool editThenRestore) : UIDialogScreenWithGameBackground(gamePath), gameID_(gameID), editThenRestore_(editThenRestore) { - lastVertical_ = UseVerticalLayout(); prevInflightFrames_ = g_Config.iInflightFrames; analogSpeedMapped_ = KeyMap::AxisFromPspButton(VIRTKEY_SPEED_ANALOG, nullptr, nullptr, nullptr); } -bool GameSettingsScreen::UseVerticalLayout() const { - return dp_yres > dp_xres * 1.1f; -} - // This needs before run CheckGPUFeatures() // TODO: Remove this if fix the issue bool CheckSupportShaderTessellationGLES() { @@ -1297,16 +1292,6 @@ UI::EventReturn GameSettingsScreen::OnHwScaleChange(UI::EventParams &e) { return UI::EVENT_DONE; } -void GameSettingsScreen::update() { - UIScreen::update(); - - bool vertical = UseVerticalLayout(); - if (vertical != lastVertical_) { - RecreateViews(); - lastVertical_ = vertical; - } -} - void GameSettingsScreen::onFinish(DialogResult result) { if (g_Config.bEnableSound) { if (PSP_IsInited() && !IsAudioInitialised()) diff --git a/UI/GameSettingsScreen.h b/UI/GameSettingsScreen.h index 5b51ee101d..86d5881f56 100644 --- a/UI/GameSettingsScreen.h +++ b/UI/GameSettingsScreen.h @@ -30,7 +30,6 @@ class GameSettingsScreen : public UIDialogScreenWithGameBackground { public: GameSettingsScreen(const Path &gamePath, std::string gameID = "", bool editThenRestore = false); - void update() override; void onFinish(DialogResult result) override; const char *tag() const override { return "GameSettings"; } @@ -42,7 +41,6 @@ protected: void CallbackRenderingDevice(bool yes); void CallbackInflightFrames(bool yes); void CallbackMemstickFolder(bool yes); - bool UseVerticalLayout() const; void dialogFinished(const Screen *dialog, DialogResult result) override; void RecreateViews() override; @@ -52,7 +50,6 @@ private: void TriggerRestart(const char *why); std::string gameID_; - bool lastVertical_; UI::CheckBox *enableReportsCheckbox_; UI::Choice *layoutEditorChoice_; UI::Choice *displayEditor_; diff --git a/UI/GamepadEmu.h b/UI/GamepadEmu.h index 0eb2a7c60c..9ec5d96556 100644 --- a/UI/GamepadEmu.h +++ b/UI/GamepadEmu.h @@ -247,6 +247,13 @@ namespace CustomKey { { ImageID("I_ARROW"), 0.0f}, { ImageID("I_ARROW"), 180.0f}, { ImageID("I_GEAR"), 0.0f}, + { ImageID("I_ROTATE_LEFT"), 0.0f}, + { ImageID("I_ROTATE_RIGHT"), 0.0f}, + { ImageID("I_ARROW_LEFT"), 0.0f}, + { ImageID("I_ARROW_RIGHT"), 0.0f}, + { ImageID("I_ARROW_UP"), 0.0f}, + { ImageID("I_ARROW_DOWN"), 0.0f}, + { ImageID("I_THREE_DOTS"), 0.0f}, }; // Shape list diff --git a/UI/MainScreen.cpp b/UI/MainScreen.cpp index 53d77213c2..0855e7eea6 100644 --- a/UI/MainScreen.cpp +++ b/UI/MainScreen.cpp @@ -966,7 +966,6 @@ UI::EventReturn GameBrowser::OnHomebrewStore(UI::EventParams &e) { MainScreen::MainScreen() { System_SendMessage("event", "mainscreen"); g_BackgroundAudio.SetGame(Path()); - lastVertical_ = UseVerticalLayout(); } MainScreen::~MainScreen() { @@ -1255,15 +1254,6 @@ void MainScreen::sendMessage(const char *message, const char *value) { void MainScreen::update() { UIScreen::update(); UpdateUIState(UISTATE_MENU); - bool vertical = UseVerticalLayout(); - if (vertical != lastVertical_) { - RecreateViews(); - lastVertical_ = vertical; - } -} - -bool MainScreen::UseVerticalLayout() const { - return dp_yres > dp_xres * 1.1f; } UI::EventReturn MainScreen::OnLoadFile(UI::EventParams &e) { diff --git a/UI/MainScreen.h b/UI/MainScreen.h index b81e193b93..995a912a92 100644 --- a/UI/MainScreen.h +++ b/UI/MainScreen.h @@ -114,7 +114,6 @@ protected: void sendMessage(const char *message, const char *value) override; void dialogFinished(const Screen *dialog, DialogResult result) override; - bool UseVerticalLayout() const; bool DrawBackgroundFor(UIContext &dc, const Path &gamePath, float progress); UI::EventReturn OnGameSelected(UI::EventParams &e); diff --git a/UI/MiscScreens.cpp b/UI/MiscScreens.cpp index e00ec856a0..f880935e08 100644 --- a/UI/MiscScreens.cpp +++ b/UI/MiscScreens.cpp @@ -356,6 +356,10 @@ void DrawBackground(UIContext &dc, float alpha, float x, float y, float z) { } } +uint32_t GetBackgroundColorWithAlpha(UIContext &dc) { + return colorAlpha(colorBlend(dc.GetTheme().backgroundColor, 0, 0.5f), 0.65f); // 0.65 = 166 = A6 +} + void DrawGameBackground(UIContext &dc, const Path &gamePath, float x, float y, float z, bool darkenBackground) { using namespace Draw; using namespace UI; @@ -379,7 +383,7 @@ void DrawGameBackground(UIContext &dc, const Path &gamePath, float x, float y, f dc.Begin(); if (darkenBackground) { - uint32_t color = colorAlpha(colorBlend(dc.GetTheme().backgroundColor, 0, 0.5f), 0.65f); + uint32_t color = GetBackgroundColorWithAlpha(dc); dc.FillRect(UI::Drawable(color), dc.GetBounds()); dc.Flush(); } diff --git a/UI/MiscScreens.h b/UI/MiscScreens.h index 07f544f855..d218739a78 100644 --- a/UI/MiscScreens.h +++ b/UI/MiscScreens.h @@ -192,3 +192,5 @@ private: float cutOffY_; bool showing_ = false; }; + +uint32_t GetBackgroundColorWithAlpha(UIContext &dc); diff --git a/UI/PauseScreen.cpp b/UI/PauseScreen.cpp index 85d60a480f..d76824d9b1 100644 --- a/UI/PauseScreen.cpp +++ b/UI/PauseScreen.cpp @@ -132,7 +132,7 @@ UI::EventReturn ScreenshotViewScreen::OnUndoState(UI::EventParams &e) { class SaveSlotView : public UI::LinearLayout { public: - SaveSlotView(const Path &gamePath, int slot, UI::LayoutParams *layoutParams = nullptr); + SaveSlotView(const Path &gamePath, int slot, bool vertical, UI::LayoutParams *layoutParams = nullptr); void GetContentDimensions(const UIContext &dc, float &w, float &h) const override { w = 500; h = 90; @@ -169,7 +169,7 @@ private: Path screenshotFilename_; }; -SaveSlotView::SaveSlotView(const Path &gameFilename, int slot, UI::LayoutParams *layoutParams) : UI::LinearLayout(UI::ORIENT_HORIZONTAL, layoutParams), slot_(slot), gamePath_(gameFilename) { +SaveSlotView::SaveSlotView(const Path &gameFilename, int slot, bool vertical, UI::LayoutParams *layoutParams) : UI::LinearLayout(UI::ORIENT_HORIZONTAL, layoutParams), slot_(slot), gamePath_(gameFilename) { using namespace UI; screenshotFilename_ = SaveState::GenerateSaveSlotFilename(gamePath_, slot, SaveState::SCREENSHOT_EXTENSION); @@ -185,7 +185,7 @@ SaveSlotView::SaveSlotView(const Path &gameFilename, int slot, UI::LayoutParams Add(lines); - LinearLayout *buttons = new LinearLayout(ORIENT_HORIZONTAL, new LinearLayoutParams(WRAP_CONTENT, WRAP_CONTENT)); + LinearLayout *buttons = new LinearLayout(vertical ? ORIENT_VERTICAL : ORIENT_HORIZONTAL, new LinearLayoutParams(WRAP_CONTENT, WRAP_CONTENT)); buttons->SetSpacing(10.0f); lines->Add(buttons); @@ -201,7 +201,11 @@ SaveSlotView::SaveSlotView(const Path &gameFilename, int slot, UI::LayoutParams std::string dateStr = SaveState::GetSlotDateAsString(gamePath_, slot_); if (!dateStr.empty()) { - lines->Add(new TextView(dateStr, new LinearLayoutParams(0.0, G_VCENTER)))->SetShadow(true); + TextView *dateView = new TextView(dateStr, new LinearLayoutParams(0.0, G_VCENTER)); + if (vertical) { + dateView->SetSmall(true); + } + lines->Add(dateView)->SetShadow(true); } } else { fv->SetFilename(Path()); @@ -262,6 +266,8 @@ void GamePauseScreen::CreateViews() { using namespace UI; + bool vertical = UseVerticalLayout(); + Margins scrollMargins(0, 20, 0, 0); Margins actionMenuMargins(0, 20, 15, 0); auto gr = GetI18NCategory("Graphics"); @@ -278,7 +284,7 @@ void GamePauseScreen::CreateViews() { leftColumnItems->Add(new Spacer(0.0)); leftColumnItems->SetSpacing(10.0); for (int i = 0; i < NUM_SAVESLOTS; i++) { - SaveSlotView *slot = leftColumnItems->Add(new SaveSlotView(gamePath_, i, new LayoutParams(FILL_PARENT, WRAP_CONTENT))); + SaveSlotView *slot = leftColumnItems->Add(new SaveSlotView(gamePath_, i, vertical, new LayoutParams(FILL_PARENT, WRAP_CONTENT))); slot->OnStateLoaded.Handle(this, &GamePauseScreen::OnState); slot->OnStateSaved.Handle(this, &GamePauseScreen::OnState); slot->OnScreenshotClicked.Handle(this, &GamePauseScreen::OnScreenshotClicked); @@ -302,7 +308,7 @@ void GamePauseScreen::CreateViews() { rewindButton->OnClick.Handle(this, &GamePauseScreen::OnRewind); } - ViewGroup *rightColumn = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(300, FILL_PARENT, actionMenuMargins)); + ViewGroup *rightColumn = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(vertical ? 200 : 300, FILL_PARENT, actionMenuMargins)); root_->Add(rightColumn); LinearLayout *rightColumnItems = new LinearLayout(ORIENT_VERTICAL); diff --git a/UI/RemoteISOScreen.cpp b/UI/RemoteISOScreen.cpp index 7d60e507a4..93e2ae7681 100644 --- a/UI/RemoteISOScreen.cpp +++ b/UI/RemoteISOScreen.cpp @@ -517,11 +517,11 @@ RemoteISOBrowseScreen::RemoteISOBrowseScreen(const std::string &url, const std:: } void RemoteISOBrowseScreen::CreateViews() { - bool vertical = UseVerticalLayout(); - auto di = GetI18NCategory("Dialog"); auto ri = GetI18NCategory("RemoteISO"); + bool vertical = UseVerticalLayout(); + Margins actionMenuMargins(0, 10, 10, 0); TabHolder *leftColumn = new TabHolder(ORIENT_HORIZONTAL, 64, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT)); diff --git a/UWP/UWP.vcxproj b/UWP/UWP.vcxproj index 3b7f8013d4..5fcdbecf25 100644 --- a/UWP/UWP.vcxproj +++ b/UWP/UWP.vcxproj @@ -1597,34 +1597,6 @@ true true - - true - true - true - true - true - true - true - true - true - true - true - true - - - true - true - true - true - true - true - true - true - true - true - true - true - true true @@ -1774,4 +1746,4 @@ - \ No newline at end of file + diff --git a/UWP/UWP.vcxproj.filters b/UWP/UWP.vcxproj.filters index 03611fcc46..15c471b062 100644 --- a/UWP/UWP.vcxproj.filters +++ b/UWP/UWP.vcxproj.filters @@ -273,12 +273,6 @@ Content\shaders - - Content\shaders - - - Content\shaders - Content\flash0\font @@ -377,4 +371,4 @@ Content - \ No newline at end of file + diff --git a/assets/compat.ini b/assets/compat.ini index 9315b3db70..1d32831437 100644 --- a/assets/compat.ini +++ b/assets/compat.ini @@ -1394,3 +1394,11 @@ NPUG70097 = true # Demo # Shining Ark, issue #15663 NPJH50717 = true ULJM06223 = true + +[DisallowFramebufferAtOffset] +# Little Big Planet, see #16030 +UCUS98744 = true +UCES01264 = true +UCJS10107 = true +NPJG00073 = true +UCAS40262 = true diff --git a/assets/lang/ar_AE.ini b/assets/lang/ar_AE.ini index 7fca56e265..0d636970f9 100644 --- a/assets/lang/ar_AE.ini +++ b/assets/lang/ar_AE.ini @@ -831,9 +831,9 @@ Undo last save = Undo last save [PostShaders] (duplicated setting, previous slider will be used) = (duplicated setting, previous slider will be used) -4xHqGLSL = 4×HQ GLSL -5xBR = 5xBR -5xBR-lv2 = 5xBR-lv2 +4xHqGLSL = 4xHQ pixel art upscaler +5xBR = 5xBR pixel art upscaler +5xBR-lv2 = 5xBR-lv2 pixel art upscaler AAColor = ‎AA-لون Amount = Amount Animation speed (0 -> disable) = Animation speed (0 -> disable) @@ -848,10 +848,8 @@ Contrast = Contrast CRT = ‎CRT خطوط الفحص FXAA = ‎FXAA منعم الحواف Gamma = Gamma -Grayscale = ‎التدرج الرمادي -GreenLevel = GreenLevel +GreenLevel = Green level Intensity = Intensity -InverseColors = ‎عكس الألوان MitchellNetravali = Bicubic (Mitchell-Netravali) Upscaler Natural = ‎الألوان الحقيقية NaturalA = Natural Colors (no blur) diff --git a/assets/lang/az_AZ.ini b/assets/lang/az_AZ.ini index 77b127ddd3..f113e191af 100644 --- a/assets/lang/az_AZ.ini +++ b/assets/lang/az_AZ.ini @@ -823,9 +823,9 @@ Undo last save = Undo last save [PostShaders] (duplicated setting, previous slider will be used) = (duplicated setting, previous slider will be used) -4xHqGLSL = 4×HQ GLSL -5xBR = 5xBR -5xBR-lv2 = 5xBR-lv2 +4xHqGLSL = 4xHQ pixel art upscaler +5xBR = 5xBR pixel art upscaler +5xBR-lv2 = 5xBR-lv2 pixel art upscaler AAColor = AA-Color Amount = Amount Animation speed (0 -> disable) = Animation speed (0 -> disable) @@ -840,10 +840,8 @@ Contrast = Contrast CRT = CRT scanlines FXAA = FXAA Antialiasing Gamma = Gamma -Grayscale = Grayscale -GreenLevel = GreenLevel +GreenLevel = Green level Intensity = Intensity -InverseColors = Inverse Colors MitchellNetravali = Bicubic (Mitchell-Netravali) Upscaler Natural = Natural Colors NaturalA = Natural Colors (no blur) diff --git a/assets/lang/bg_BG.ini b/assets/lang/bg_BG.ini index 8448605e28..45755b3357 100644 --- a/assets/lang/bg_BG.ini +++ b/assets/lang/bg_BG.ini @@ -823,9 +823,9 @@ Undo last save = Undo last save [PostShaders] (duplicated setting, previous slider will be used) = (duplicated setting, previous slider will be used) -4xHqGLSL = 4×HQ GLSL -5xBR = 5xBR -5xBR-lv2 = 5xBR-lv2 +4xHqGLSL = 4xHQ pixel art upscaler +5xBR = 5xBR pixel art upscaler +5xBR-lv2 = 5xBR-lv2 pixel art upscaler AAColor = AA-Color Amount = Amount Animation speed (0 -> disable) = Animation speed (0 -> disable) @@ -840,10 +840,8 @@ Contrast = Contrast CRT = CRT scanlines FXAA = FXAA Antialiasing Gamma = Gamma -Grayscale = Сива скала -GreenLevel = GreenLevel +GreenLevel = Green level Intensity = Intensity -InverseColors = Противоположни цветове MitchellNetravali = Bicubic (Mitchell-Netravali) Upscaler Natural = Natural Colors NaturalA = Natural Colors (no blur) diff --git a/assets/lang/ca_ES.ini b/assets/lang/ca_ES.ini index 6aaddb4987..4a96b71296 100644 --- a/assets/lang/ca_ES.ini +++ b/assets/lang/ca_ES.ini @@ -823,9 +823,9 @@ Undo last save = Undo last save [PostShaders] (duplicated setting, previous slider will be used) = (duplicated setting, previous slider will be used) -4xHqGLSL = 4×HQ GLSL -5xBR = 5xBR -5xBR-lv2 = 5xBR-lv2 +4xHqGLSL = 4xHQ pixel art upscaler +5xBR = 5xBR pixel art upscaler +5xBR-lv2 = 5xBR-lv2 pixel art upscaler AAColor = AA-Color Amount = Amount Animation speed (0 -> disable) = Animation speed (0 -> disable) @@ -840,10 +840,8 @@ Contrast = Contrast CRT = CRT scanlines FXAA = FXAA Antialiasing Gamma = Gamma -Grayscale = Grayscale -GreenLevel = GreenLevel +GreenLevel = Green level Intensity = Intensity -InverseColors = Inverse Colors MitchellNetravali = Bicubic (Mitchell-Netravali) Upscaler Natural = Natural Colors NaturalA = Natural Colors (no blur) diff --git a/assets/lang/cz_CZ.ini b/assets/lang/cz_CZ.ini index 6870e757c8..cc316cb2ba 100644 --- a/assets/lang/cz_CZ.ini +++ b/assets/lang/cz_CZ.ini @@ -823,9 +823,9 @@ Undo last save = Undo last save [PostShaders] (duplicated setting, previous slider will be used) = (duplicated setting, previous slider will be used) -4xHqGLSL = 4×HQ GLSL -5xBR = 5xBR -5xBR-lv2 = 5xBR-lv2 +4xHqGLSL = 4xHQ pixel art upscaler +5xBR = 5xBR pixel art upscaler +5xBR-lv2 = 5xBR-lv2 pixel art upscaler AAColor = AA-Barva Amount = Amount Animation speed (0 -> disable) = Animation speed (0 -> disable) @@ -840,10 +840,8 @@ Contrast = Contrast CRT = Skenovací řádky CRT FXAA = Vyhlazování hran FXAA Gamma = Gamma -Grayscale = Stupně šedi -GreenLevel = GreenLevel +GreenLevel = Green level Intensity = Intensity -InverseColors = Inverzní barvy MitchellNetravali = Bicubic (Mitchell-Netravali) Upscaler Natural = Přirozené barvy NaturalA = Natural Colors (no blur) diff --git a/assets/lang/da_DK.ini b/assets/lang/da_DK.ini index 26516055bc..d7a79a5173 100644 --- a/assets/lang/da_DK.ini +++ b/assets/lang/da_DK.ini @@ -823,9 +823,9 @@ Undo last save = Undo last save [PostShaders] (duplicated setting, previous slider will be used) = (duplicated setting, previous slider will be used) -4xHqGLSL = 4×HQ GLSL -5xBR = 5xBR -5xBR-lv2 = 5xBR-lv2 +4xHqGLSL = 4xHQ pixel art upscaler +5xBR = 5xBR pixel art upscaler +5xBR-lv2 = 5xBR-lv2 pixel art upscaler AAColor = AA-Color Amount = Amount Animation speed (0 -> disable) = Animation speed (0 -> disable) @@ -840,10 +840,8 @@ Contrast = Contrast CRT = CRT scanlinier FXAA = FXAA Antialiasing Gamma = Gamma -Grayscale = Gråskala -GreenLevel = GreenLevel +GreenLevel = Green level Intensity = Intensity -InverseColors = Inverterede farver MitchellNetravali = Bicubic (Mitchell-Netravali) Upscaler Natural = Naturlige farver NaturalA = Natural Colors (no blur) diff --git a/assets/lang/de_DE.ini b/assets/lang/de_DE.ini index 9f351c67d8..4ff46ac564 100644 --- a/assets/lang/de_DE.ini +++ b/assets/lang/de_DE.ini @@ -824,8 +824,8 @@ Undo last save = Undo last save [PostShaders] (duplicated setting, previous slider will be used) = (duplicated setting, previous slider will be used) 4xHqGLSL = 4×HqGLSL -5xBR = 5xBR -5xBR-lv2 = 5xBR-lv2 +5xBR = 5xBR pixel art upscaler +5xBR-lv2 = 5xBR-lv2 pixel art upscaler AAColor = AAColor Amount = Amount Animation speed (0 -> disable) = Animation speed (0 -> disable) @@ -840,10 +840,8 @@ Contrast = Contrast CRT = CRT Scanlines FXAA = FXAA Gamma = Gamma -Grayscale = Graustufen -GreenLevel = GreenLevel +GreenLevel = Green level Intensity = Intensity -InverseColors = Farben invertieren MitchellNetravali = Bicubic (Mitchell-Netravali) Upscaler Natural = Natürliche Farben NaturalA = Natürliche Farben (kein Blur) diff --git a/assets/lang/dr_ID.ini b/assets/lang/dr_ID.ini index be19011bf0..cf02bd536c 100644 --- a/assets/lang/dr_ID.ini +++ b/assets/lang/dr_ID.ini @@ -823,9 +823,9 @@ Undo last save = Undo last save [PostShaders] (duplicated setting, previous slider will be used) = (duplicated setting, previous slider will be used) -4xHqGLSL = 4×HQ GLSL -5xBR = 5xBR -5xBR-lv2 = 5xBR-lv2 +4xHqGLSL = 4xHQ pixel art upscaler +5xBR = 5xBR pixel art upscaler +5xBR-lv2 = 5xBR-lv2 pixel art upscaler AAColor = AA-Color Amount = Amount Animation speed (0 -> disable) = Animation speed (0 -> disable) @@ -840,10 +840,8 @@ Contrast = Contrast CRT = CRT scanlines FXAA = FXAA Antialiasing Gamma = Gamma -Grayscale = Grayscale -GreenLevel = GreenLevel +GreenLevel = Green level Intensity = Intensity -InverseColors = Inverse Colors MitchellNetravali = Bicubic (Mitchell-Netravali) Upscaler Natural = Natural Colors NaturalA = Natural Colors (no blur) diff --git a/assets/lang/en_US.ini b/assets/lang/en_US.ini index e7d6e56f25..5d4213d734 100644 --- a/assets/lang/en_US.ini +++ b/assets/lang/en_US.ini @@ -818,9 +818,9 @@ Undo last save = Undo last save [PostShaders] (duplicated setting, previous slider will be used) = (duplicated setting, previous slider will be used) -4xHqGLSL = 4×HQ GLSL -5xBR = 5xBR -5xBR-lv2 = 5xBR-lv2 +4xHqGLSL = 4xHQ pixel art upscaler +5xBR = 5xBR pixel art upscaler +5xBR-lv2 = 5xBR-lv2 pixel art upscaler AAColor = AA-Color Amount = Amount Black border = Black border @@ -833,10 +833,8 @@ Contrast = Contrast CRT = CRT scanlines FXAA = FXAA Antialiasing Gamma = Gamma -Grayscale = Grayscale -GreenLevel = GreenLevel +GreenLevel = Green level Intensity = Intensity -InverseColors = Inverse Colors Natural = Natural Colors NaturalA = Natural Colors (no blur) Off = Off diff --git a/assets/lang/es_ES.ini b/assets/lang/es_ES.ini index 0e08165255..2ba2f033d1 100644 --- a/assets/lang/es_ES.ini +++ b/assets/lang/es_ES.ini @@ -824,8 +824,8 @@ Undo last save = Deshacer guard. de estado [PostShaders] (duplicated setting, previous slider will be used) = (configuración duplicada, se usará la anterior) 4xHqGLSL = 4xHQ GLSL -5xBR = 5xBR -5xBR-lv2 = 5xBR-lv2 +5xBR = 5xBR pixel art upscaler +5xBR-lv2 = 5xBR-lv2 pixel art upscaler AAColor = AA + color Amount = Cantidad Animation speed (0 -> disable) = Animation speed (0 -> disable) @@ -840,10 +840,8 @@ Contrast = Contraste CRT = Pantalla de tubo (CRT) FXAA = Antialiasing por FXAA Gamma = Gamma -Grayscale = Escala de grises -GreenLevel = GreenLevel +GreenLevel = Green level Intensity = Intensidad -InverseColors = Invertir colores MitchellNetravali = Bicubic (Mitchell-Netravali) Upscaler Natural = Colores naturales NaturalA = Colores naturales (sin difuminar) diff --git a/assets/lang/es_LA.ini b/assets/lang/es_LA.ini index 1c60ffd956..cfa059c136 100644 --- a/assets/lang/es_LA.ini +++ b/assets/lang/es_LA.ini @@ -823,7 +823,7 @@ Undo last save = Deshacer guard. de estado [PostShaders] (duplicated setting, previous slider will be used) = (configuraciones duplicadas, se usará la anterior) -4xHqGLSL = 4×HQ GLSL +4xHqGLSL = 4xHQ pixel art upscaler 5xBR = 5×BR 5xBR-lv2 = 5×BR-lv2 AAColor = AA + Color @@ -840,10 +840,8 @@ Contrast = Contraste CRT = Pantalla de tubo (CRT) FXAA = Antialiasing por FXAA Gamma = Gamma -Grayscale = Escala de grises -GreenLevel = GreenLevel +GreenLevel = Green level Intensity = Intensidad -InverseColors = Invertir colores MitchellNetravali = Bicubic (Mitchell-Netravali) Upscaler Natural = Colores naturales NaturalA = Colores naturales (sin desenfoques) diff --git a/assets/lang/fa_IR.ini b/assets/lang/fa_IR.ini index ce59fe1520..19dd0501ce 100644 --- a/assets/lang/fa_IR.ini +++ b/assets/lang/fa_IR.ini @@ -823,9 +823,9 @@ Undo last save = Undo last save [PostShaders] (duplicated setting, previous slider will be used) = (duplicated setting, previous slider will be used) -4xHqGLSL = 4×HQ GLSL -5xBR = 5xBR -5xBR-lv2 = 5xBR-lv2 +4xHqGLSL = 4xHQ pixel art upscaler +5xBR = 5xBR pixel art upscaler +5xBR-lv2 = 5xBR-lv2 pixel art upscaler AAColor = AA-Color Amount = Amount Animation speed (0 -> disable) = Animation speed (0 -> disable) @@ -840,10 +840,8 @@ Contrast = Contrast CRT = CRT scanlines FXAA = FXAA Antialiasing Gamma = Gamma -Grayscale = Grayscale -GreenLevel = GreenLevel +GreenLevel = Green level Intensity = Intensity -InverseColors = Inverse Colors MitchellNetravali = Bicubic (Mitchell-Netravali) Upscaler Natural = Natural Colors NaturalA = Natural Colors (no blur) diff --git a/assets/lang/fi_FI.ini b/assets/lang/fi_FI.ini index 030b9adfbe..26e994dd7e 100644 --- a/assets/lang/fi_FI.ini +++ b/assets/lang/fi_FI.ini @@ -823,9 +823,9 @@ Undo last save = Undo last save [PostShaders] (duplicated setting, previous slider will be used) = (duplicated setting, previous slider will be used) -4xHqGLSL = 4×HQ GLSL -5xBR = 5xBR -5xBR-lv2 = 5xBR-lv2 +4xHqGLSL = 4xHQ pixel art upscaler +5xBR = 5xBR pixel art upscaler +5xBR-lv2 = 5xBR-lv2 pixel art upscaler AAColor = AA-Color Amount = Amount Animation speed (0 -> disable) = Animation speed (0 -> disable) @@ -840,10 +840,8 @@ Contrast = Contrast CRT = CRT scanlines FXAA = FXAA Antialiasing Gamma = Gamma -Grayscale = Grayscale -GreenLevel = GreenLevel +GreenLevel = Green level Intensity = Intensity -InverseColors = Inverse Colors MitchellNetravali = Bicubic (Mitchell-Netravali) Upscaler Natural = Natural Colors NaturalA = Natural Colors (no blur) diff --git a/assets/lang/fr_FR.ini b/assets/lang/fr_FR.ini index 20bf66436f..41875c547b 100644 --- a/assets/lang/fr_FR.ini +++ b/assets/lang/fr_FR.ini @@ -840,10 +840,8 @@ Contrast = Contraste CRT = Lignes de balayage CRT FXAA = Anticrénelage FXAA Gamma = Gamma -Grayscale = Niveaux de gris -GreenLevel = GreenLevel +GreenLevel = Green level Intensity = Intensité -InverseColors = Couleurs inversées MitchellNetravali = Bicubic (Mitchell-Netravali) Upscaler Natural = Couleurs naturelles NaturalA = Couleurs naturelles (sans flou) diff --git a/assets/lang/gl_ES.ini b/assets/lang/gl_ES.ini index 5384d7b934..d202f17fcb 100644 --- a/assets/lang/gl_ES.ini +++ b/assets/lang/gl_ES.ini @@ -823,9 +823,9 @@ Undo last save = Undo last save [PostShaders] (duplicated setting, previous slider will be used) = (duplicated setting, previous slider will be used) -4xHqGLSL = 4×HQ GLSL -5xBR = 5xBR -5xBR-lv2 = 5xBR-lv2 +4xHqGLSL = 4xHQ pixel art upscaler +5xBR = 5xBR pixel art upscaler +5xBR-lv2 = 5xBR-lv2 pixel art upscaler AAColor = AA + cor Amount = Amount Animation speed (0 -> disable) = Animation speed (0 -> disable) @@ -840,10 +840,8 @@ Contrast = Contrast CRT = Monitor con «scanlines» (CRT) FXAA = Antialiasing FXAA Gamma = Gamma -Grayscale = Escala de grises -GreenLevel = GreenLevel +GreenLevel = Green level Intensity = Intensity -InverseColors = Invertir cores MitchellNetravali = Bicubic (Mitchell-Netravali) Upscaler Natural = Cores naturais NaturalA = Natural Colors (no blur) diff --git a/assets/lang/gr_EL.ini b/assets/lang/gr_EL.ini index 113602a7a2..240c2b50ed 100644 --- a/assets/lang/gr_EL.ini +++ b/assets/lang/gr_EL.ini @@ -823,9 +823,9 @@ Undo last save = Undo last save [PostShaders] (duplicated setting, previous slider will be used) = (duplicated setting, previous slider will be used) -4xHqGLSL = 4×HQ GLSL -5xBR = 5xBR -5xBR-lv2 = 5xBR-lv2 +4xHqGLSL = 4xHQ pixel art upscaler +5xBR = 5xBR pixel art upscaler +5xBR-lv2 = 5xBR-lv2 pixel art upscaler AAColor = AA-Color Amount = Amount Animation speed (0 -> disable) = Animation speed (0 -> disable) @@ -840,10 +840,8 @@ Contrast = Contrast CRT = Γραμμές σάρωσης CRT FXAA = Εξομάλυνση κορυφών FXAA Gamma = Gamma -Grayscale = Ασπρόμαυρο -GreenLevel = GreenLevel +GreenLevel = Green level Intensity = Intensity -InverseColors = Αντιστροφή Χρωμάτων MitchellNetravali = Bicubic (Mitchell-Netravali) Upscaler Natural = Φυσικά Χρώματα NaturalA = Natural Colors (no blur) diff --git a/assets/lang/he_IL.ini b/assets/lang/he_IL.ini index 3e1145ab04..9239455c89 100644 --- a/assets/lang/he_IL.ini +++ b/assets/lang/he_IL.ini @@ -823,9 +823,9 @@ Undo last save = Undo last save [PostShaders] (duplicated setting, previous slider will be used) = (duplicated setting, previous slider will be used) -4xHqGLSL = 4×HQ GLSL -5xBR = 5xBR -5xBR-lv2 = 5xBR-lv2 +4xHqGLSL = 4xHQ pixel art upscaler +5xBR = 5xBR pixel art upscaler +5xBR-lv2 = 5xBR-lv2 pixel art upscaler AAColor = AA-Color Amount = Amount Animation speed (0 -> disable) = Animation speed (0 -> disable) @@ -840,10 +840,8 @@ Contrast = Contrast CRT = CRT scanlines FXAA = FXAA Antialiasing Gamma = Gamma -Grayscale = Grayscale -GreenLevel = GreenLevel +GreenLevel = Green level Intensity = Intensity -InverseColors = Inverse Colors MitchellNetravali = Bicubic (Mitchell-Netravali) Upscaler Natural = Natural Colors NaturalA = Natural Colors (no blur) diff --git a/assets/lang/he_IL_invert.ini b/assets/lang/he_IL_invert.ini index 5087eeb6ac..1d42057032 100644 --- a/assets/lang/he_IL_invert.ini +++ b/assets/lang/he_IL_invert.ini @@ -823,9 +823,9 @@ Undo last save = Undo last save [PostShaders] (duplicated setting, previous slider will be used) = (duplicated setting, previous slider will be used) -4xHqGLSL = 4×HQ GLSL -5xBR = 5xBR -5xBR-lv2 = 5xBR-lv2 +4xHqGLSL = 4xHQ pixel art upscaler +5xBR = 5xBR pixel art upscaler +5xBR-lv2 = 5xBR-lv2 pixel art upscaler AAColor = AA-Color Amount = Amount Animation speed (0 -> disable) = Animation speed (0 -> disable) @@ -840,10 +840,8 @@ Contrast = Contrast CRT = CRT scanlines FXAA = FXAA Antialiasing Gamma = Gamma -Grayscale = Grayscale -GreenLevel = GreenLevel +GreenLevel = Green level Intensity = Intensity -InverseColors = Inverse Colors MitchellNetravali = Bicubic (Mitchell-Netravali) Upscaler Natural = Natural Colors NaturalA = Natural Colors (no blur) diff --git a/assets/lang/hr_HR.ini b/assets/lang/hr_HR.ini index c39645fbd7..066ba47e75 100644 --- a/assets/lang/hr_HR.ini +++ b/assets/lang/hr_HR.ini @@ -823,9 +823,9 @@ Undo last save = Undo last save [PostShaders] (duplicated setting, previous slider will be used) = (duplicated setting, previous slider will be used) -4xHqGLSL = 4×HQ GLSL -5xBR = 5xBR -5xBR-lv2 = 5xBR-lv2 +4xHqGLSL = 4xHQ pixel art upscaler +5xBR = 5xBR pixel art upscaler +5xBR-lv2 = 5xBR-lv2 pixel art upscaler AAColor = AA-Color Amount = Amount Animation speed (0 -> disable) = Animation speed (0 -> disable) @@ -840,10 +840,8 @@ Contrast = Contrast CRT = CRT scanlines FXAA = FXAA Antialiasing Gamma = Gamma -Grayscale = Grayscale -GreenLevel = GreenLevel +GreenLevel = Green level Intensity = Intensity -InverseColors = Izmijeni boje MitchellNetravali = Bicubic (Mitchell-Netravali) Upscaler Natural = Prirodne boje NaturalA = Prirodne boje (bez zamućivanja) diff --git a/assets/lang/hu_HU.ini b/assets/lang/hu_HU.ini index 71859b15d9..0579abd7c7 100644 --- a/assets/lang/hu_HU.ini +++ b/assets/lang/hu_HU.ini @@ -823,9 +823,9 @@ Undo last save = Undo last save [PostShaders] (duplicated setting, previous slider will be used) = (duplicated setting, previous slider will be used) -4xHqGLSL = 4×HQ GLSL -5xBR = 5xBR -5xBR-lv2 = 5xBR-lv2 +4xHqGLSL = 4xHQ pixel art upscaler +5xBR = 5xBR pixel art upscaler +5xBR-lv2 = 5xBR-lv2 pixel art upscaler AAColor = AA-Color Amount = Mennyiség Animation speed (0 -> disable) = Animation speed (0 -> disable) @@ -840,10 +840,8 @@ Contrast = Kontraszt CRT = CRT FXAA = FXAA élsimítás Gamma = Gamma -Grayscale = Szürkeárnyalatos -GreenLevel = GreenLevel +GreenLevel = Green level Intensity = Erősség -InverseColors = Színek megfordítása MitchellNetravali = Bicubic (Mitchell-Netravali) Upscaler Natural = Természetes színek NaturalA = Természetes színek (elmosódás nélkül) diff --git a/assets/lang/id_ID.ini b/assets/lang/id_ID.ini index e821086ee2..2355e6feed 100644 --- a/assets/lang/id_ID.ini +++ b/assets/lang/id_ID.ini @@ -823,9 +823,9 @@ Undo last save = Urungkan penyimpanan terakhir [PostShaders] (duplicated setting, previous slider will be used) = (pengaturan duplikat, penggeser sebelumnya akan digunakan) -4xHqGLSL = 4×HQ GLSL -5xBR = 5xBR -5xBR-lv2 = 5xBR-lv2 +4xHqGLSL = 4xHQ pixel art upscaler +5xBR = 5xBR pixel art upscaler +5xBR-lv2 = 5xBR-lv2 pixel art upscaler AAColor = Warna AA Amount = Nominal Animation speed (0 -> disable) = Animation speed (0 -> disable) @@ -840,10 +840,8 @@ Contrast = Kontras CRT = CRT FXAA = Mengurangi Artifak Distorsi (FXAA) Gamma = Gamma -Grayscale = Abu-abu -GreenLevel = GreenLevel +GreenLevel = Green level Intensity = Intensitas -InverseColors = Warna Terbalik MitchellNetravali = Bicubic (Mitchell-Netravali) Upscaler Natural = Warna Natural NaturalA = Warna Natural (tidak kabur) diff --git a/assets/lang/it_IT.ini b/assets/lang/it_IT.ini index 2e88064c95..14cafefb42 100644 --- a/assets/lang/it_IT.ini +++ b/assets/lang/it_IT.ini @@ -796,8 +796,8 @@ Undo last save = Annulla ultimo salvataggio [PostShaders] (duplicated setting, previous slider will be used) = (parametri duplicati, verrà usata la precedente regolazione) 4xHqGLSL = 4xHQ GLSL -5xBR = 5xBR -5xBR-lv2 = 5xBR-lv2 +5xBR = 5xBR pixel art upscaler +5xBR-lv2 = 5xBR-lv2 pixel art upscaler AAColor = Colore AA Amount = Quantità Animation speed (0 -> disable) = Velocità animazione (0 -> disabilita) @@ -812,10 +812,8 @@ Contrast = Contrasto CRT = Linee di scansione CRT FXAA = Antialiasing FXAA Gamma = Gamma -Grayscale = Scala di grigi -GreenLevel = GreenLevel +GreenLevel = Green level Intensity = Intensità -InverseColors = Colori invertiti MitchellNetravali = Upscaler Bicubico (Mitchell-Netravali) Natural = Colori naturali NaturalA = Colori naturali (nessuna sfocatura) diff --git a/assets/lang/ja_JP.ini b/assets/lang/ja_JP.ini index 4bb7bb99f2..f420a0646e 100644 --- a/assets/lang/ja_JP.ini +++ b/assets/lang/ja_JP.ini @@ -794,9 +794,9 @@ Undo last save = セーブ内容を戻す [PostShaders] (duplicated setting, previous slider will be used) = (duplicated setting, previous slider will be used) -4xHqGLSL = 4×HQ GLSL -5xBR = 5xBR -5xBR-lv2 = 5xBR-lv2 +4xHqGLSL = 4xHQ pixel art upscaler +5xBR = 5xBR pixel art upscaler +5xBR-lv2 = 5xBR-lv2 pixel art upscaler AAColor = AA-Color Amount = Amount Animation speed (0 -> disable) = Animation speed (0 -> disable) @@ -811,10 +811,8 @@ Contrast = Contrast CRT = CRT scanlines FXAA = FXAA Antialiasing Gamma = Gamma -Grayscale = Grayscale -GreenLevel = GreenLevel +GreenLevel = Green level Intensity = Intensity -InverseColors = Inverse Colors MitchellNetravali = Bicubic (Mitchell-Netravali) Upscaler Natural = Natural Colors NaturalA = Natural Colors (no blur) diff --git a/assets/lang/jv_ID.ini b/assets/lang/jv_ID.ini index 595b012bcb..320fd6ba87 100644 --- a/assets/lang/jv_ID.ini +++ b/assets/lang/jv_ID.ini @@ -823,9 +823,9 @@ Undo last save = Undo last save [PostShaders] (duplicated setting, previous slider will be used) = (duplicated setting, previous slider will be used) -4xHqGLSL = 4×HQ GLSL -5xBR = 5xBR -5xBR-lv2 = 5xBR-lv2 +4xHqGLSL = 4xHQ pixel art upscaler +5xBR = 5xBR pixel art upscaler +5xBR-lv2 = 5xBR-lv2 pixel art upscaler AAColor = AA-Color Amount = Amount Animation speed (0 -> disable) = Animation speed (0 -> disable) @@ -840,10 +840,8 @@ Contrast = Contrast CRT = CRT scanlines FXAA = FXAA Antialiasing Gamma = Gamma -Grayscale = Keabu-abuan -GreenLevel = GreenLevel +GreenLevel = Green level Intensity = Intensity -InverseColors = Warna kebalik MitchellNetravali = Bicubic (Mitchell-Netravali) Upscaler Natural = Warna Natural NaturalA = Natural Colors (no blur) diff --git a/assets/lang/ko_KR.ini b/assets/lang/ko_KR.ini index c7af635ae7..c99e778885 100644 --- a/assets/lang/ko_KR.ini +++ b/assets/lang/ko_KR.ini @@ -794,9 +794,9 @@ Undo last save = 마지막 저장 실행 취소 [PostShaders] (duplicated setting, previous slider will be used) = (설정이 중복되면 이전 슬라이더가 사용됩니다.) -4xHqGLSL = 4×HQ GLSL -5xBR = 5xBR -5xBR-lv2 = 5xBR-lv2 +4xHqGLSL = 4xHQ pixel art upscaler +5xBR = 5xBR pixel art upscaler +5xBR-lv2 = 5xBR-lv2 pixel art upscaler AAColor = AA-색상 Amount = 양 Black border = 검정 테두리 @@ -809,10 +809,8 @@ Contrast = 명암 CRT = CRT 스캔라인 FXAA = FXAA 안티 에일리어싱 Gamma = 감마 -Grayscale = 그레이스케일 -GreenLevel = GreenLevel +GreenLevel = Green level Intensity = 강도 -InverseColors = 색 반전 Natural = 자연스러운 색상 NaturalA = 자연스러운 색상 (흐림 없음) Off = 끔 diff --git a/assets/lang/lo_LA.ini b/assets/lang/lo_LA.ini index b1cf4ebcbc..c1458dbc36 100644 --- a/assets/lang/lo_LA.ini +++ b/assets/lang/lo_LA.ini @@ -823,9 +823,9 @@ Undo last save = Undo last save [PostShaders] (duplicated setting, previous slider will be used) = (duplicated setting, previous slider will be used) -4xHqGLSL = 4×HQ GLSL -5xBR = 5xBR -5xBR-lv2 = 5xBR-lv2 +4xHqGLSL = 4xHQ pixel art upscaler +5xBR = 5xBR pixel art upscaler +5xBR-lv2 = 5xBR-lv2 pixel art upscaler AAColor = AA-Color Amount = Amount Animation speed (0 -> disable) = Animation speed (0 -> disable) @@ -840,10 +840,8 @@ Contrast = Contrast CRT = CRT FXAA = FXAA Gamma = Gamma -Grayscale = Grayscale -GreenLevel = GreenLevel +GreenLevel = Green level Intensity = Intensity -InverseColors = InverseColors MitchellNetravali = Bicubic (Mitchell-Netravali) Upscaler Natural = Natural NaturalA = Natural Colors (no blur) diff --git a/assets/lang/lt-LT.ini b/assets/lang/lt-LT.ini index 2a64d882e3..646f2900a5 100644 --- a/assets/lang/lt-LT.ini +++ b/assets/lang/lt-LT.ini @@ -823,9 +823,9 @@ Undo last save = Undo last save [PostShaders] (duplicated setting, previous slider will be used) = (duplicated setting, previous slider will be used) -4xHqGLSL = 4×HQ GLSL -5xBR = 5xBR -5xBR-lv2 = 5xBR-lv2 +4xHqGLSL = 4xHQ pixel art upscaler +5xBR = 5xBR pixel art upscaler +5xBR-lv2 = 5xBR-lv2 pixel art upscaler AAColor = AA-Spalva Amount = Amount Animation speed (0 -> disable) = Animation speed (0 -> disable) @@ -840,10 +840,8 @@ Contrast = Contrast CRT = CRT skenavimo linjos FXAA = FXAA Antialiasing Gamma = Gamma -Grayscale = Grayscale -GreenLevel = GreenLevel +GreenLevel = Green level Intensity = Intensity -InverseColors = Perkeisti spalvas MitchellNetravali = Bicubic (Mitchell-Netravali) Upscaler Natural = Naturalios spalvos NaturalA = Natural Colors (no blur) diff --git a/assets/lang/ms_MY.ini b/assets/lang/ms_MY.ini index 4ecf0105ac..d991357c5c 100644 --- a/assets/lang/ms_MY.ini +++ b/assets/lang/ms_MY.ini @@ -823,9 +823,9 @@ Undo last save = Undo last save [PostShaders] (duplicated setting, previous slider will be used) = (duplicated setting, previous slider will be used) -4xHqGLSL = 4×HQ GLSL -5xBR = 5xBR -5xBR-lv2 = 5xBR-lv2 +4xHqGLSL = 4xHQ pixel art upscaler +5xBR = 5xBR pixel art upscaler +5xBR-lv2 = 5xBR-lv2 pixel art upscaler AAColor = Warna AA Amount = Amount Animation speed (0 -> disable) = Animation speed (0 -> disable) @@ -840,10 +840,8 @@ Contrast = Contrast CRT = CRT scanlines FXAA = FXAA Anti aliasing Gamma = Gamma -Grayscale = Grayscale -GreenLevel = GreenLevel +GreenLevel = Green level Intensity = Intensity -InverseColors = Terbalikkan warna MitchellNetravali = Bicubic (Mitchell-Netravali) Upscaler Natural = Warna asli NaturalA = Natural Colors (no blur) diff --git a/assets/lang/nl_NL.ini b/assets/lang/nl_NL.ini index cea29bbbc5..249efacdb9 100644 --- a/assets/lang/nl_NL.ini +++ b/assets/lang/nl_NL.ini @@ -823,9 +823,9 @@ Undo last save = Undo last save [PostShaders] (duplicated setting, previous slider will be used) = (duplicated setting, previous slider will be used) -4xHqGLSL = 4×HQ GLSL -5xBR = 5xBR -5xBR-lv2 = 5xBR-lv2 +4xHqGLSL = 4xHQ pixel art upscaler +5xBR = 5xBR pixel art upscaler +5xBR-lv2 = 5xBR-lv2 pixel art upscaler AAColor = AA-kleur Amount = Amount Animation speed (0 -> disable) = Animation speed (0 -> disable) @@ -840,10 +840,8 @@ Contrast = Contrast CRT = CRT-scanlijnen FXAA = FXAA-antialiasing Gamma = Gamma -Grayscale = Grijswaarden -GreenLevel = GreenLevel +GreenLevel = Green level Intensity = Intensity -InverseColors = Omgekeerde kleuren MitchellNetravali = Bicubic (Mitchell-Netravali) Upscaler Natural = Natuurlijke kleuren NaturalA = Natural Colors (no blur) diff --git a/assets/lang/no_NO.ini b/assets/lang/no_NO.ini index d0808c29b7..bc11cc40a7 100644 --- a/assets/lang/no_NO.ini +++ b/assets/lang/no_NO.ini @@ -823,9 +823,9 @@ Undo last save = Undo last save [PostShaders] (duplicated setting, previous slider will be used) = (duplicated setting, previous slider will be used) -4xHqGLSL = 4×HQ GLSL -5xBR = 5xBR -5xBR-lv2 = 5xBR-lv2 +4xHqGLSL = 4xHQ pixel art upscaler +5xBR = 5xBR pixel art upscaler +5xBR-lv2 = 5xBR-lv2 pixel art upscaler AAColor = AA-Color Amount = Amount Animation speed (0 -> disable) = Animation speed (0 -> disable) @@ -840,10 +840,8 @@ Contrast = Contrast CRT = CRT scanlines FXAA = FXAA Antialiasing Gamma = Gamma -Grayscale = Gråtoneskala -GreenLevel = GreenLevel +GreenLevel = Green level Intensity = Intensity -InverseColors = Inverse Colors MitchellNetravali = Bicubic (Mitchell-Netravali) Upscaler Natural = Natural Colors NaturalA = Natural Colors (no blur) diff --git a/assets/lang/pl_PL.ini b/assets/lang/pl_PL.ini index b01d9e8770..b194aebb45 100644 --- a/assets/lang/pl_PL.ini +++ b/assets/lang/pl_PL.ini @@ -824,8 +824,8 @@ Undo last save = Undo last save [PostShaders] (duplicated setting, previous slider will be used) = (duplicated setting, previous slider will be used) 4xHqGLSL = Skalowanie 4×HQ -5xBR = 5xBR -5xBR-lv2 = 5xBR-lv2 +5xBR = 5xBR pixel art upscaler +5xBR-lv2 = 5xBR-lv2 pixel art upscaler AAColor = Kolor AA Amount = Amount Animation speed (0 -> disable) = Animation speed (0 -> disable) @@ -840,10 +840,8 @@ Contrast = Contrast CRT = Imitacja monitora CRT FXAA = Wygładzanie FXAA Gamma = Gamma -Grayscale = Skala szarości -GreenLevel = GreenLevel +GreenLevel = Green level Intensity = Intensity -InverseColors = Odwrócenie kolorów MitchellNetravali = Bicubic (Mitchell-Netravali) Upscaler Natural = Naturalne kolory NaturalA = Naturalne kolory (bez rozmycia) diff --git a/assets/lang/pt_BR.ini b/assets/lang/pt_BR.ini index c58d1353b7..85916ba0d8 100644 --- a/assets/lang/pt_BR.ini +++ b/assets/lang/pt_BR.ini @@ -818,9 +818,9 @@ Undo last save = Desfazer o último salvamento [PostShaders] (duplicated setting, previous slider will be used) = (Configuração duplicada, o slider anterior será usado) -4xHqGLSL = 4×HQ GLSL -5xBR = 5xBR -5xBR-lv2 = 5xBR-lv2 +4xHqGLSL = 4xHQ pixel art upscaler +5xBR = 5xBR pixel art upscaler +5xBR-lv2 = 5xBR-lv2 pixel art upscaler AAColor = Cores-do-AA Amount = Quantidade Black border = Borda preta @@ -833,10 +833,8 @@ Contrast = Contraste CRT = Scanlines do CRT FXAA = Anti-aliasing do FXAA Gamma = Gama -Grayscale = Tons de cinza GreenLevel = Nível verde Intensity = Intensidade -InverseColors = Cores invertidas Natural = Cores naturais NaturalA = Cores naturais (sem borrão) Off = Desligado diff --git a/assets/lang/pt_PT.ini b/assets/lang/pt_PT.ini index b5d98f0685..ed04174528 100644 --- a/assets/lang/pt_PT.ini +++ b/assets/lang/pt_PT.ini @@ -818,9 +818,9 @@ Undo last save = Desfazer o último salvamento [PostShaders] (duplicated setting, previous slider will be used) = (Definição duplicada, o slider anterior será usado) -4xHqGLSL = 4×HQ GLSL -5xBR = 5xBR -5xBR-lv2 = 5xBR-lv2 +4xHqGLSL = 4xHQ pixel art upscaler +5xBR = 5xBR pixel art upscaler +5xBR-lv2 = 5xBR-lv2 pixel art upscaler AAColor = Cores-do-AA Amount = Quantidade Black border = Borda preta @@ -833,10 +833,8 @@ Contrast = Contraste CRT = Scanlines do CRT FXAA = Anti-aliasing do FXAA Gamma = Gama -Grayscale = Tons de cinza -GreenLevel = GreenLevel +GreenLevel = Green level Intensity = Intensidade -InverseColors = Cores invertidas Natural = Cores naturais NaturalA = Cores naturais (sem borrão) Off = Desligado diff --git a/assets/lang/ro_RO.ini b/assets/lang/ro_RO.ini index 135170999a..2ac9cbe570 100644 --- a/assets/lang/ro_RO.ini +++ b/assets/lang/ro_RO.ini @@ -823,9 +823,9 @@ Undo last save = Undo last save [PostShaders] (duplicated setting, previous slider will be used) = (duplicated setting, previous slider will be used) -4xHqGLSL = 4×HQ GLSL -5xBR = 5xBR -5xBR-lv2 = 5xBR-lv2 +4xHqGLSL = 4xHQ pixel art upscaler +5xBR = 5xBR pixel art upscaler +5xBR-lv2 = 5xBR-lv2 pixel art upscaler AAColor = AA-Color Amount = Amount Animation speed (0 -> disable) = Animation speed (0 -> disable) @@ -840,10 +840,8 @@ Contrast = Contrast CRT = CRT scanlines FXAA = FXAA Antialiasing Gamma = Gamma -Grayscale = Grayscale -GreenLevel = GreenLevel +GreenLevel = Green level Intensity = Intensity -InverseColors = Culori Inversate MitchellNetravali = Bicubic (Mitchell-Netravali) Upscaler Natural = Culori Naturale NaturalA = Natural Colors (no blur) diff --git a/assets/lang/ru_RU.ini b/assets/lang/ru_RU.ini index 318d699e06..04396dd888 100644 --- a/assets/lang/ru_RU.ini +++ b/assets/lang/ru_RU.ini @@ -794,9 +794,9 @@ Undo last save = Отменить последнее сохранение [PostShaders] (duplicated setting, previous slider will be used) = (дублированная настройка, используется предыдущий ползунок) -4xHqGLSL = 4×HQ GLSL -5xBR = 5xBR -5xBR-lv2 = 5xBR-lv2 +4xHqGLSL = 4xHQ pixel art upscaler +5xBR = 5xBR pixel art upscaler +5xBR-lv2 = 5xBR-lv2 pixel art upscaler AAColor = AA-цвета Amount = Размер Animation speed (0 -> disable) = Скорость анимации (0 -> disable) @@ -811,10 +811,8 @@ Contrast = Контрастность CRT = ЭЛТ-развертка FXAA = Сглаживание FXAA Gamma = Gamma -Grayscale = Оттенки серого -GreenLevel = GreenLevel +GreenLevel = Green level Intensity = Интенсивность -InverseColors = Инвертированные цвета MitchellNetravali = Бикубический (Mitchell-Netravali) апскейлер Natural = Естественные цвета NaturalA = Естественные цвета (без размытия) diff --git a/assets/lang/sv_SE.ini b/assets/lang/sv_SE.ini index a1b55bc588..a5cea55f8e 100644 --- a/assets/lang/sv_SE.ini +++ b/assets/lang/sv_SE.ini @@ -795,8 +795,8 @@ Undo last save = Ångra senaste spar [PostShaders] (duplicated setting, previous slider will be used) = (duplicated setting, previous slider will be used) 4xHqGLSL = 4×HqGLSL -5xBR = 5xBR -5xBR-lv2 = 5xBR-lv2 +5xBR = 5xBR pixel art upscaler +5xBR-lv2 = 5xBR-lv2 pixel art upscaler AAColor = AAColor Amount = Amount Animation speed (0 -> disable) = Animation speed (0 -> disable) @@ -811,10 +811,8 @@ Contrast = Contrast CRT = CRT scanlines FXAA = FXAA Gamma = Gamma -Grayscale = Gråskala -GreenLevel = GreenLevel +GreenLevel = Green level Intensity = Intensity -InverseColors = InverseColors MitchellNetravali = Bicubic (Mitchell-Netravali) Upscaler Natural = Natural NaturalA = Natural Colors (no blur) diff --git a/assets/lang/tg_PH.ini b/assets/lang/tg_PH.ini index 260c8f3ec6..93272cd417 100644 --- a/assets/lang/tg_PH.ini +++ b/assets/lang/tg_PH.ini @@ -824,8 +824,8 @@ Undo last save = Undo last save [PostShaders] (duplicated setting, previous slider will be used) = (duplicated setting, previous slider will be used) 4xHqGLSL = 4テ幽Q GLSL -5xBR = 5xBR -5xBR-lv2 = 5xBR-lv2 +5xBR = 5xBR pixel art upscaler +5xBR-lv2 = 5xBR-lv2 pixel art upscaler AAColor = AA-Color Amount = Amount Animation speed (0 -> disable) = Animation speed (0 -> disable) @@ -840,10 +840,8 @@ Contrast = Contrast CRT = CRT scanlines FXAA = FXAA Antialiasing Gamma = Gamma -Grayscale = Grayscale -GreenLevel = GreenLevel +GreenLevel = Green level Intensity = Intensity -InverseColors = Inverse Colors MitchellNetravali = Bicubic (Mitchell-Netravali) Upscaler Natural = Natural Colors NaturalA = Natural Colors (no blur) diff --git a/assets/lang/th_TH.ini b/assets/lang/th_TH.ini index ace20b3246..179a6e4bdf 100644 --- a/assets/lang/th_TH.ini +++ b/assets/lang/th_TH.ini @@ -840,10 +840,8 @@ Contrast = ความคมชัด CRT = ภาพออกโทนเหลืองขึ้นเส้น FXAA = ภาพเน้นลบขอบรอยหยัก Gamma = แกมม่า -Grayscale = ภาพโทนสีเทา GreenLevel = ระดับสีเขียว Intensity = ความเข้มของแสง -InverseColors = ภาพสีกลับ MitchellNetravali = ภาพอัพสเกลแบบไบคิวบิค (มิทเชลล์-เนทราวาลิ) Natural = ภาพเน้นสีธรรมชาติ NaturalA = ภาพเน้นสีธรรมชาติ (ไม่เบลอ) diff --git a/assets/lang/tr_TR.ini b/assets/lang/tr_TR.ini index a12dcd7f67..379752394b 100644 --- a/assets/lang/tr_TR.ini +++ b/assets/lang/tr_TR.ini @@ -824,9 +824,9 @@ Undo last load = Son yüklemeyi geri al Undo last save = Son kaydetmeyi geri al [PostShaders] (duplicated setting, previous slider will be used) = (yinelenen ayar, önceki kaydırıcı kullanılacaktır) -4xHqGLSL = 4×HQ GLSL -5xBR = 5xBR -5xBR-lv2 = 5xBR-lv2 +4xHqGLSL = 4xHQ pixel art upscaler +5xBR = 5xBR pixel art upscaler +5xBR-lv2 = 5xBR-lv2 pixel art upscaler AAColor = AA-Color Amount = Miktar Animation speed (0 -> disable) = Animation speed (0 -> disable) @@ -841,10 +841,8 @@ Contrast = Karşıtlık CRT = CRT tarama çizgileri FXAA = FXAA Kenar Yumuşatma Gamma = Gamma -Grayscale = Gri tonlama -GreenLevel = GreenLevel +GreenLevel = Green level Intensity = Yoğunluk -InverseColors = Ters Renkler MitchellNetravali = Bicubic (Mitchell-Netravali) Upscaler Natural = Doğal Renkler NaturalA = Doğal Renkler (bulanıklık yok) diff --git a/assets/lang/uk_UA.ini b/assets/lang/uk_UA.ini index bd967631c1..0981be9a88 100644 --- a/assets/lang/uk_UA.ini +++ b/assets/lang/uk_UA.ini @@ -823,9 +823,9 @@ Undo last save = Undo last save [PostShaders] (duplicated setting, previous slider will be used) = (duplicated setting, previous slider will be used) -4xHqGLSL = 4×HQ GLSL -5xBR = 5xBR -5xBR-lv2 = 5xBR-lv2 +4xHqGLSL = 4xHQ pixel art upscaler +5xBR = 5xBR pixel art upscaler +5xBR-lv2 = 5xBR-lv2 pixel art upscaler AAColor = AA-Кольори Amount = Amount Animation speed (0 -> disable) = Animation speed (0 -> disable) @@ -840,10 +840,8 @@ Contrast = Контраст CRT = Кінескоп 1 FXAA = FXAA згладжування Gamma = Гамма -Grayscale = Відтінки сірого -GreenLevel = GreenLevel +GreenLevel = Green level Intensity = Інтенсивність -InverseColors = Зворотні кольори MitchellNetravali = Bicubic (Mitchell-Netravali) Upscaler Natural = Натуральні кольори NaturalA = Натуральні кольори (без розмиття) diff --git a/assets/lang/vi_VN.ini b/assets/lang/vi_VN.ini index b0788c4456..1e73d69f8a 100644 --- a/assets/lang/vi_VN.ini +++ b/assets/lang/vi_VN.ini @@ -823,9 +823,9 @@ Undo last save = Undo last save [PostShaders] (duplicated setting, previous slider will be used) = (duplicated setting, previous slider will be used) -4xHqGLSL = 4×HQ GLSL -5xBR = 5xBR -5xBR-lv2 = 5xBR-lv2 +4xHqGLSL = 4xHQ pixel art upscaler +5xBR = 5xBR pixel art upscaler +5xBR-lv2 = 5xBR-lv2 pixel art upscaler AAColor = AA-màu Amount = Amount Animation speed (0 -> disable) = Animation speed (0 -> disable) @@ -840,10 +840,8 @@ Contrast = Contrast CRT = CRT đường quét FXAA = Chống răng cưa FXAA Gamma = Gamma -Grayscale = Đen trắng -GreenLevel = GreenLevel +GreenLevel = Green level Intensity = Intensity -InverseColors = Màu âm bản MitchellNetravali = Bicubic (Mitchell-Netravali) Upscaler Natural = Màu tự nhiên (mờ) NaturalA = Màu tự nhiên (không mờ) diff --git a/assets/lang/zh_CN.ini b/assets/lang/zh_CN.ini index 0fc0b4cf6a..5e17fd9341 100644 --- a/assets/lang/zh_CN.ini +++ b/assets/lang/zh_CN.ini @@ -824,9 +824,9 @@ Undo last save = 撤销保存 [PostShaders] (duplicated setting, previous slider will be used) = (设置重复, 将使用上面滑块的值) -4xHqGLSL = 4×HQ GLSL -5xBR = 5xBR -5xBR-lv2 = 5xBR-lv2 +4xHqGLSL = 4xHQ pixel art upscaler +5xBR = 5xBR pixel art upscaler +5xBR-lv2 = 5xBR-lv2 pixel art upscaler AAColor = AA-Color Amount = 数量 Animation speed (0 -> disable) = 动画速度(0->禁用) @@ -840,10 +840,8 @@ Contrast = 对比度 CRT = CRT 扫描线 FXAA = FXAA (快速近似抗锯齿) Gamma = 伽马值 -Grayscale = 灰度图 -GreenLevel = GreenLevel +GreenLevel = Green level Intensity = 强度 -InverseColors = 反色 Natural = 自然色 NaturalA = 自然色(无模糊) Off = 关闭 diff --git a/assets/lang/zh_TW.ini b/assets/lang/zh_TW.ini index 1133d8adaa..7458167121 100644 --- a/assets/lang/zh_TW.ini +++ b/assets/lang/zh_TW.ini @@ -794,9 +794,9 @@ Undo last save = 復原上次儲存 [PostShaders] (duplicated setting, previous slider will be used) = (重複的設定,將使用上一個滑桿) -4xHqGLSL = 4×HQ GLSL -5xBR = 5xBR -5xBR-lv2 = 5xBR-lv2 +4xHqGLSL = 4xHQ pixel art upscaler +5xBR = 5xBR pixel art upscaler +5xBR-lv2 = 5xBR-lv2 pixel art upscaler AAColor = AA-Color Amount = 數量 Black border = 黑色框線 @@ -809,10 +809,8 @@ Contrast = 對比度 CRT = CRT 掃描線 FXAA = FXAA 消除鋸齒 Gamma = 色差補正 -Grayscale = 灰階 GreenLevel = 綠色色階 Intensity = 濃度 -InverseColors = 反轉色彩 Natural = 自然色彩 NaturalA = 自然色彩 (無模糊) Off = 關閉 diff --git a/assets/shaders/defaultshaders.ini b/assets/shaders/defaultshaders.ini index 2a33454069..b0e48dabb8 100644 --- a/assets/shaders/defaultshaders.ini +++ b/assets/shaders/defaultshaders.ini @@ -28,13 +28,18 @@ Name=Vignette Author=Henrik Fragment=vignette.fsh Vertex=fxaa.vsh -[Grayscale] -Name=Grayscale -Author=Henrik -Fragment=grayscale.fsh -Vertex=fxaa.vsh +SettingName1=Power +SettingDefaultValue1=0.6 +SettingMaxValue1=2.0 +SettingMinValue1=0.1 +SettingStep1=0.1 +SettingName2=Aspect +SettingDefaultValue2=1.0 +SettingMaxValue2=2.0 +SettingMinValue2=0.5 +SettingStep2=0.1 [Bloom] -Name=Bloom +Name=Bloom Shader Fragment=bloom.fsh Vertex=fxaa.vsh SettingName1=Amount @@ -52,13 +57,8 @@ Vertex=fxaa.vsh SettingName1=Amount SettingDefaultValue1=1.5 SettingMaxValue1=3.0 -SettingMinValue1=1.0 +SettingMinValue1=0.1 SettingStep1=0.1 -[InverseColors] -Name=Inverse Colors -Author=Henrik -Fragment=inversecolors.fsh -Vertex=fxaa.vsh [Scanlines] Name=Scanlines (CRT) Fragment=scanlines.fsh @@ -208,3 +208,13 @@ Name=SideBySide Stereo Author=Henrik Rydgård Fragment=stereo_sbs.fsh Vertex=fxaa.vsh +[LCDPersistence] +Name=LCD Persistence +Fragment=persistence.fsh +Vertex=fxaa.vsh +UsePreviousFrame=true +SettingName1=Strength +SettingDefaultValue1=0.4 +SettingMaxValue1=0.8 +SettingMinValue1=0.3 +SettingStep1=0.05 \ No newline at end of file diff --git a/assets/shaders/grayscale.fsh b/assets/shaders/grayscale.fsh deleted file mode 100644 index f309204e12..0000000000 --- a/assets/shaders/grayscale.fsh +++ /dev/null @@ -1,16 +0,0 @@ -// Simple grayscale shader - -#ifdef GL_ES -precision mediump float; -precision mediump int; -#endif - -uniform sampler2D sampler0; -varying vec2 v_texcoord0; - -void main() { - vec3 rgb = texture2D(sampler0, v_texcoord0.xy).xyz; - float luma = dot(rgb, vec3(0.299, 0.587, 0.114)); - gl_FragColor.rgb = vec3(luma, luma, luma); - gl_FragColor.a = 1.0; -} diff --git a/assets/shaders/inversecolors.fsh b/assets/shaders/inversecolors.fsh deleted file mode 100644 index c6367ca2fd..0000000000 --- a/assets/shaders/inversecolors.fsh +++ /dev/null @@ -1,19 +0,0 @@ -// Simple false color shader - -#ifdef GL_ES -precision mediump float; -precision mediump int; -#endif - -uniform sampler2D sampler0; -varying vec2 v_texcoord0; - -void main() { - vec3 rgb = texture2D(sampler0, v_texcoord0.xy).xyz; - float luma = dot(rgb, vec3(0.299, 0.587, 0.114)); - vec3 gray = vec3(luma, luma, luma) - 0.5; - rgb -= vec3(0.5, 0.5, 0.5); - - gl_FragColor.rgb = mix(rgb, gray, 2.0) + 0.5; - gl_FragColor.a = 1.0; -} diff --git a/assets/shaders/persistence.fsh b/assets/shaders/persistence.fsh new file mode 100644 index 0000000000..9be51d8225 --- /dev/null +++ b/assets/shaders/persistence.fsh @@ -0,0 +1,14 @@ +#ifdef GL_ES +precision mediump float; +precision mediump int; +#endif + +uniform sampler2D sampler0; +uniform sampler2D sampler2; +uniform vec4 u_setting; +varying vec2 v_texcoord0; + +void main() { + gl_FragColor.rgb = mix(texture2D(sampler0, v_texcoord0.xy).rgb, texture2D(sampler2, v_texcoord0.xy).rgb, u_setting.x); + gl_FragColor.a = 1.0; +} diff --git a/assets/shaders/vignette.fsh b/assets/shaders/vignette.fsh index 7e2c92e69a..b4dc2b41c9 100644 --- a/assets/shaders/vignette.fsh +++ b/assets/shaders/vignette.fsh @@ -8,9 +8,15 @@ precision mediump int; uniform sampler2D sampler0; varying vec2 v_texcoord0; +uniform vec4 u_setting; + void main() { - float vignette = 1.1 - 0.6 * (dot(v_texcoord0 - 0.5, v_texcoord0 - 0.5) * 2.0); + vec2 diff = v_texcoord0 - 0.5; + diff.x *= u_setting.y; + diff.y /= u_setting.y; + float vignette = 1.0 - min(1.0, u_setting.x * (dot(diff, diff) * 2.0)); vec3 rgb = texture2D(sampler0, v_texcoord0.xy).xyz; + rgb *= vignette; gl_FragColor.rgb = vignette * rgb; gl_FragColor.a = 1.0; } diff --git a/libretro/CMakeLists.txt b/libretro/CMakeLists.txt index 69efea8980..d04cc155e5 100644 --- a/libretro/CMakeLists.txt +++ b/libretro/CMakeLists.txt @@ -22,6 +22,10 @@ if(ANDROID) endif() if(NOT MSVC) - target_link_libraries(ppsspp_libretro "-Wl,-Bsymbolic") + if (IOS) + target_link_libraries(ppsspp_libretro "-Wl") + else() + target_link_libraries(ppsspp_libretro "-Wl,-Bsymbolic") + endif() endif() target_link_libraries(ppsspp_libretro ${LinkCommon}) diff --git a/libretro/libretro.cpp b/libretro/libretro.cpp index e0cb5c0e6e..40c737399e 100644 --- a/libretro/libretro.cpp +++ b/libretro/libretro.cpp @@ -23,6 +23,7 @@ #include "Common/File/VFS/VFS.h" #include "Common/File/VFS/AssetReader.h" #include "Common/Data/Text/I18n.h" +#include "Common/StringUtils.h" #include "Core/Config.h" #include "Core/ConfigValues.h" @@ -36,6 +37,8 @@ #include "Core/System.h" #include "Core/CoreTiming.h" #include "Core/HW/Display.h" +#include "Core/CwCheat.h" +#include "Core/ELF/ParamSFO.h" #include "GPU/GPUState.h" #include "GPU/GPUInterface.h" @@ -1413,6 +1416,9 @@ bool retro_load_game(const struct retro_game_info *game) useEmuThread = ctx->GetGPUCore() == GPUCORE_GLES; + // default to interpreter to allow startup in platforms w/o JIT capability + g_Config.iCpuCore = (int)CPUCore::INTERPRETER; + CoreParameter coreParam = {}; coreParam.enableSound = true; coreParam.fileToStart = Path(std::string(game->path)); @@ -1422,9 +1428,11 @@ bool retro_load_game(const struct retro_game_info *game) coreParam.headLess = true; coreParam.graphicsContext = ctx; coreParam.gpuCore = ctx->GetGPUCore(); - coreParam.cpuCore = (CPUCore)g_Config.iCpuCore; check_variables(coreParam); + // set cpuCore from libretro setting variable + coreParam.cpuCore = (CPUCore)g_Config.iCpuCore; + std::string error_string; if (!PSP_InitStart(coreParam, &error_string)) { @@ -1663,9 +1671,86 @@ size_t retro_get_memory_size(unsigned id) return 0; } -void retro_cheat_reset(void) {} +void retro_cheat_reset(void) { + // Init Cheat Engine + CWCheatEngine *cheatEngine = new CWCheatEngine(g_paramSFO.GetDiscID()); + Path file=cheatEngine->CheatFilename(); -void retro_cheat_set(unsigned index, bool enabled, const char *code) { } + // Output cheats to cheat file + std::ofstream outFile; + outFile.open(file.c_str()); + outFile << "_S " << g_paramSFO.GetDiscID() << std::endl; + outFile.close(); + + g_Config.bReloadCheats = true; + + // Parse and Run the Cheats + cheatEngine->ParseCheats(); + if (cheatEngine->HasCheats()) { + cheatEngine->Run(); + } + +} + +void retro_cheat_set(unsigned index, bool enabled, const char *code) { + // Initialize Cheat Engine + CWCheatEngine *cheatEngine = new CWCheatEngine(g_paramSFO.GetDiscID()); + cheatEngine->CreateCheatFile(); + Path file=cheatEngine->CheatFilename(); + + // Read cheats file + std::vector cheats; + std::ifstream cheat_content(file.c_str()); + std::stringstream buffer; + buffer << cheat_content.rdbuf(); + std::string existing_cheats=ReplaceAll(buffer.str(), std::string("\n_C"), std::string("|")); + SplitString(existing_cheats, '|', cheats); + + // Generate Cheat String + std::stringstream cheat(""); + cheat << (enabled ? "1 " : "0 ") << index << std::endl; + std::string code_str(code); + std::vector codes; + code_str=ReplaceAll(code_str, std::string(" "), std::string("+")); + SplitString(code_str, '+', codes); + int part=0; + for (int i=0; i < codes.size(); i++) { + if (codes[i].size() <= 2) { + // _L _M ..etc + // Assume _L + } else if (part == 0) { + cheat << "_L " << codes[i] << " "; + part++; + } else { + cheat << codes[i] << std::endl; + part=0; + } + } + + // Add or Replace the Cheat + if (index + 1 < cheats.size()) { + cheats[index + 1]=cheat.str(); + } else { + cheats.push_back(cheat.str()); + } + + // Output cheats to cheat file + std::ofstream outFile; + outFile.open(file.c_str()); + outFile << "_S " << g_paramSFO.GetDiscID() << std::endl; + for (int i=1; i < cheats.size(); i++) { + outFile << "_C" << cheats[i] << std::endl; + } + outFile.close(); + + g_Config.bReloadCheats = true; + + // Parse and Run the Cheats + cheatEngine->ParseCheats(); + if (cheatEngine->HasCheats()) { + cheatEngine->Run(); + } +} int System_GetPropertyInt(SystemProperty prop) {