Skip to content

Screenshots not all taked from command line #37

@Narann

Description

@Narann

I realize, in some situation, every requested screenshots (argument --testshots) are not all generated.

I have a test suite that open a rom with a save state and save some screenshots. Generated command line looks like this:

./mupen64plus --resolution 640x480 --audio dummy --configdir ./ --nosaveoptions --testshots 2,5 --savestate mupen64plus-regression-test/save_state/1080sb-charselect.st0 --sshotdir mupen64plus-regression-test/screenshot /home/narann/code/repo/mupen64plus/mupen64plus-regression-test/rom/1080sb.z64

The second screenshot is never generated. Interestingly, I have around hundred tests and only 4-6 have this problem. It's not game related, maybe more save state related.

Looking at the code where the console ask for the screen shot:

https://github.com/mupen64plus/mupen64plus-ui-console/blob/master/src/main.c#L141

And how the core handle it:

https://github.com/mupen64plus/mupen64plus-core/blob/b9765eca453ed46773655c44bc86fbcdeb33ab7c/src/main/main.c#L725

As I understand the code, the core ask for a screenshot "next time" the video plugin reach video_plugin_render_callback. But the console ask for M64CMD_STOP as soon the last frame+1 is reached. This mean, the frame callback M64CMD_SET_FRAME_CALLBACK is executed before the video plugin reach video_plugin_render_callback and take its screenshot.

I will do some test to know if wait few frames after the latest screenshot before close the emulator could help...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions