-
Notifications
You must be signed in to change notification settings - Fork 0
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
Dev progress #2
Dev progress #2
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks mostly good - would be great Niki to see it for a more detailed look. Seems like there are too many .unwrap()s that should be .expect()
I didn't know about partials - definitely a nice feature of NWG
} | ||
Ok(()) | ||
} | ||
fn process_event<'a>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
such a handler is a good idea for sure
pub struct WebView { | ||
controller: Rc<OnceCell<Controller>>, | ||
} | ||
impl PartialUi for WebView { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's interesting, didn't know NWG has PartialUi.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went over this PR and gave feedback on things that popped up while looking at it.
I hope they are useful.
|
||
#[derive(Serialize, Deserialize, Debug, Clone)] | ||
pub struct RPCRequest { | ||
pub id: u64, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check if we're building the code for 32bits if we have to change this to u32
or the compiler is able to do some magic and compile u64
on 32bit builds.
src/stremio_app/named_pipe.rs
Outdated
use kernel32::{ | ||
CloseHandle, ConnectNamedPipe, CreateFileW, CreateNamedPipeW, DisconnectNamedPipe, | ||
FlushFileBuffers, ReadFile, WaitNamedPipeW, WriteFile, | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of curiosity: Why do we use this kernel32
from windows?
Isn't it possible to use the std::fs
module for e.g. Reading a file?
trait MpvExt { | ||
fn wake_up(&self); | ||
} | ||
|
||
impl MpvExt for Mpv { | ||
// @TODO create a PR to the `libmpv` crate and then remove `libmpv-sys` from Cargo.toml? | ||
fn wake_up(&self) { | ||
unsafe { libmpv_sys::mpv_wakeup(self.ctx.as_ptr()) } | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, I guess you can either export this unsafe function or add a function to Mpv that wraps it.
This PR is nowhere finished. It is just for tracking the progress.