Fix Render discard issue [pd-3ds]
- Clip Rects do now not discard when they move out of screen (cause the maths ends in < 0 which is not working with u32) - Fixing ui7 crash wehn im input was nullptr
This commit is contained in:
Submodule backends/3ds/libpicasso updated: 5d47f32928...a6b1e8ddbd
@@ -180,8 +180,10 @@ void GfxC3D::RenderDrawData(const PD::Li::CmdPool& Commands) {
|
||||
if (ScissorEnabled) {
|
||||
// Figure out this setup was pain
|
||||
C3D_SetScissor(GPU_SCISSOR_NORMAL,
|
||||
ViewPort.y - (ScissorRect.y + ScissorRect.w),
|
||||
ViewPort.x - (ScissorRect.x + ScissorRect.z),
|
||||
std::clamp(ViewPort.y - (ScissorRect.y + ScissorRect.w), 0,
|
||||
ViewPort.y),
|
||||
std::clamp(ViewPort.x - (ScissorRect.x + ScissorRect.z), 0,
|
||||
ViewPort.x),
|
||||
ViewPort.y - ScissorRect.y, ViewPort.x - ScissorRect.x);
|
||||
} else {
|
||||
C3D_SetScissor(GPU_SCISSOR_DISABLE, 0, 0, 0, 0);
|
||||
|
||||
@@ -153,7 +153,7 @@ class U8Iterator {
|
||||
}
|
||||
|
||||
bool PeekNext32(u32& ret) {
|
||||
if (ptr + 1 == nullptr || *ptr + 1 == 0) return false;
|
||||
// if ((ptr + 1) == 0 || *(ptr + 1) == 0) return false;
|
||||
u8 c = *ptr;
|
||||
if (c < 0x80) {
|
||||
ret = c;
|
||||
|
||||
@@ -38,6 +38,7 @@ class PD_API Image : public Container {
|
||||
* @param size Custom Size of the Image
|
||||
*/
|
||||
Image(Li::Texture::Ref img, fvec2 size = 0.f, Li::Rect uv = fvec4(0.f)) {
|
||||
if (!img) return;
|
||||
this->img = img;
|
||||
if (size == fvec2(0.f)) {
|
||||
size = img->GetSize();
|
||||
@@ -60,7 +61,7 @@ class PD_API Image : public Container {
|
||||
void Draw() override;
|
||||
|
||||
private:
|
||||
Li::Texture::Ref img; ///< Texture reference to the Image
|
||||
Li::Texture::Ref img = nullptr; ///< Texture reference to the Image
|
||||
fvec2 newsize = 0.f; ///< New Size
|
||||
Li::Rect cuv; ///< Custom UV
|
||||
};
|
||||
|
||||
@@ -26,6 +26,7 @@ SOFTWARE.
|
||||
namespace PD {
|
||||
namespace UI7 {
|
||||
PD_API void Image::Draw() {
|
||||
if (!img) return;
|
||||
// Assert(io.get() && list.get(), "Did you run Container::Init correctly?");
|
||||
// Assert(img.get(), "Image is nullptr!");
|
||||
// io->Ren->OnScreen(screen);
|
||||
|
||||
Reference in New Issue
Block a user