Skip to content

Simplify Qt multimedia code #3438

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

Closed
wants to merge 3 commits into from
Closed

Conversation

oltolm
Copy link
Contributor

@oltolm oltolm commented Mar 16, 2025

I think the unique pointers in InputController and AudioProcessorQt are unnecessary. I have refactored the code to not use unique pointers and simplified the code.

Copy link
Member

@endrift endrift left a comment

Choose a reason for hiding this comment

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

While this does arguably simplify the AudioProcessorQt code, it does this by making a device and then effectively immediately deleting it as soon as the settings get applied. I'm not sure that's really a worthwhile change.

Further, I'm not sure the camera code is really simplified. You removed a variable, but in the process introduced the same setup-teardown-setup cycle. Also, we really don't want to create a camera early. There's no reason to instantiate one 99.9% of the time.

@@ -1343,6 +1343,8 @@ static uint8_t _readLuminance(struct GBALuminanceSource* luminance) {
}
#endif

#pragma push_macro("CALLBACK")
Copy link
Member

Choose a reason for hiding this comment

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

I have no idea what warning this fixes. Is it Windows-specific? Regardless, it doesn't belong in this PR.

@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.3)
cmake_minimum_required(VERSION 3.10)
Copy link
Member

Choose a reason for hiding this comment

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

Please rebase. I made this change a few days ago so it's not needed anymore.

@oltolm
Copy link
Contributor Author

oltolm commented Apr 7, 2025

Yes, it's probably not worth it.

@oltolm oltolm closed this Apr 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants