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

C++ Overhaul #38

Merged
merged 20 commits into from
Jun 1, 2024
Merged

C++ Overhaul #38

merged 20 commits into from
Jun 1, 2024

Conversation

zoeyjodon
Copy link
Owner

@zoeyjodon zoeyjodon commented May 26, 2024

Overview
The basis of this changeset was replacing all of the 3DS specific C files with C++ files so I could simplify memory management and more easily avoid memory errors.

After that initial change, a lot of features I had been meaning to add got way easier to implement, so I just kept implementing them. New features include:

  • Full keyboard touchscreen input
  • New options for displaying on the bottom screen and mirroring the top and bottom screens to allow absolute touch inputs
  • Enabling 3D display while in dual screen modes
  • Moving rendering logic to the GPU (can now stream 800×480p from Sunshine at 60fps, even in 3D mode) (Original solution created by ds84182)

Changelog

  • Change 3DS specific files to C++ files
  • Replace malloc/free calls with C++ objects
  • Break renderer logic into classes
  • Break touchscreen logic into classes
  • Use GPU to render images from the decoder
  • Add keyboard touchscreen input
  • Remove app exit from the end of stream logic
  • Fix stream initialization logic to allow reinitialization

Related Issues

zoeyjodon added 15 commits May 6, 2024 17:41
Adds 'extern "C"' wrapper to ffmpeg.h
Moves pixel copying logic into separate "IN3dsRenderer" classes to make code more readable.
Replaces "dual_screen" config option with a config option that allows users to select between multiple display types.
Replace base renderer interface with an abstract class.
Add common pixel writing logic in the base renderer class.
Simplify some variable setup
Fix freeze when going to home
Use top and bottom renderers for dual screen renderer (bottom not working yet)
Add debug option to prevent drawing frame counters
Centralize more display logic in the base renderer.
Move performance bars to the display they're debugging.
Update the default 3DS config settings to optimize for the new renderer.
Simplify touchscreen start, move, and stop event handlers.
Move input initialization before stream initialization.
Silence ffmpeg build warnings
Add keyboard graphics resources.
Suppress build warnings that we were previously ignoring (will revisit in future MR)
Move TAB to INS key
Maks shift key consistend between keyboards
Fix temp/lock screen updates for alt keyboard
Update color scheme to be more "2010's Nintendo"
Simplify special key state management.
Update the software decoder to work with the new renderer.
Move the shader into the rendering directory.
Replace fprintf calls for the 3DS UI
Fix stream variable reinitialization issues
@zoeyjodon zoeyjodon self-assigned this May 26, 2024
Add logic for showing alternate number keys when shift is pressed
Use rgb565 format for the bottom screen images
Remove extra gfx exit/init calls
Modify image colors to improve rgb565 visibility
Centralize double buffering disable
Add replace imagemagick with ffmpeg for rgb conversion
@zoeyjodon zoeyjodon merged commit f842631 into n3ds-main Jun 1, 2024
2 checks passed
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.

1 participant