Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Core/Movie: Refactor to class, move to System. #12502

Merged
merged 1 commit into from Jan 15, 2024

Conversation

AdmiralCurtiss
Copy link
Contributor

A bit of global state remains (the header in BeginRecordingInput()) due to unclear lifetime requirements.

There's some really ugly stuff in here that definitely needs to be refactored at some point. The MD5 threads are just detached into the void (so in theory if the System was deallocated before the thread was done calculating the MD5 it would write to stale pointers...), mbedtls_md_file() probably doesn't do the right thing for Unicode filenames on Windows (or anything sensible for non-ISO input files, for that matter), the disc change storage method is very limiting for no good reason except I guess it had to fit into a predefined header somehow, it's extremely unclear what anything is initialized to (wouldn't surprise me if some state survives into the next movie if you record multiple within a session...), and that's just the obvious ones I noticed.

@AdmiralCurtiss AdmiralCurtiss force-pushed the globals-movie branch 4 times, most recently from 70328fd to 81e270d Compare January 14, 2024 13:36
Copy link
Member

@JosJuice JosJuice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM other than a nitpick. And yeah, the MD5 thread really isn't great. Now that we've added a way to clone volumes for the achievement PRs, so it would be a good idea to use that for movies in the future.

Source/Core/DolphinQt/MainWindow.cpp Outdated Show resolved Hide resolved
A bit of global state remains (the `header` in `BeginRecordingInput()`) due to unclear lifetime requirements.
@lioncash lioncash merged commit e3d39fc into dolphin-emu:master Jan 15, 2024
11 checks passed
@AdmiralCurtiss AdmiralCurtiss deleted the globals-movie branch January 15, 2024 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants