Skip to content

VFPU_CONTEXT might not be initialized for further gum calls #189

@nitwhiz

Description

@nitwhiz

I tried following a psp graphics programming tutorial and on PPSSPP it ran fine, as long as illegal memory access is ignored. On the PSP, it crashes.
If illegal memory accesses aren't ignored, it crashes on PPSSPP, too.

With psplink I found that psp::sys::sceGumMatrixMode prints access errors over and over again.

After digging through psp::sys::gum, I saw that if psp::sys::sceGumLoadIdentity or psp::sys::sceGumLoadMatrix weren't called before other gum methods using the VFPU_CONTEXT, there would be no VFPU_CONTEXT to access (as it's None).

Only these 2 methods are calling VFPU_CONTEXT.get_or_insert_with instead of psp::sys::gum::get_context_unchecked.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions