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

Big refactor #4

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open

Big refactor #4

wants to merge 26 commits into from

Conversation

Schuwi
Copy link

@Schuwi Schuwi commented Apr 10, 2022

I forked this project some time ago because it seemed quite dead but I liked the premise.
Now that some life has returned and I got my fork into a good condition I wanted to open the discussion on whether (some of) these changes should be merged.

My overarching goal was to make the code more robust.
I tried to check and document the unsafe code, verified the platform implementations with each platform's documentation and added graceful error handling.
The biggest and potentially most controversial API change is probably the merging of EventSource and EditorWindow into only EditorWindow. I did not understand the original motivation to separate them. In my fork of ampli-Fe I used Arc<EditorWindow> and everything worked out fine.

I tested the changes using the ampli-Fe fork in REAPER on Debian, Windows and macOS. Windows using DX12 has a weird graphical issue but I would imagine that's down to something with the update to wgpu 0.12, will double check that and create a separate issue. The original macOS implementation did not work in REAPER, as the mouse input and rendered output were misaligned. Returning the subview instead of the parent NSView as RawWindowHandle fixed this.

That's about the gist of it. I'd be interested to hear your thoughts on this.

I'll have to cleanup my git log a bit, all those duplicate commits...

Edit: formatting

Schuwi added 26 commits January 16, 2022 17:35
caused by missing cargo check run
- Use created subview instead of parent NSView as RawWindowHandle
- Refactor internal interface to remove forced split between EventSource and EditorWindow

MacOS works fine now, Windows and Linux won't compile; need the refactor
Fixes Windows compile but Linux still won't compile
Everything should work fine now
caused by missing cargo check run
- Use created subview instead of parent NSView as RawWindowHandle
- Refactor internal interface to remove forced split between EventSource and EditorWindow

MacOS works fine now, Windows and Linux won't compile; need the refactor
Fixes Windows compile but Linux still won't compile
Everything should work fine now
and run cargo fmt
- Update raw-window-handle to 0.4
- Add changelog
- Update README
- Bump version to 0.3.0

Additionally: fix winapi features
@Schuwi Schuwi marked this pull request as ready for review April 10, 2022 01:25
@antonok-edm antonok-edm self-requested a review April 14, 2022 23:00
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