mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-28 07:33:14 -04:00
Handle errors from MakeCurrent and SwapBuffers
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#![cfg(target_os = "emscripten")]
|
||||
|
||||
use ContextError;
|
||||
use GlContext;
|
||||
|
||||
pub use api::emscripten::{Window, WindowProxy, MonitorID, get_available_monitors};
|
||||
@@ -15,7 +16,7 @@ impl HeadlessContext {
|
||||
}
|
||||
|
||||
impl GlContext for HeadlessContext {
|
||||
unsafe fn make_current(&self) {
|
||||
unsafe fn make_current(&self) -> Result<(), ContextError> {
|
||||
self.0.make_current()
|
||||
}
|
||||
|
||||
@@ -27,7 +28,7 @@ impl GlContext for HeadlessContext {
|
||||
self.0.get_proc_address(addr)
|
||||
}
|
||||
|
||||
fn swap_buffers(&self) {
|
||||
fn swap_buffers(&self) -> Result<(), ContextError> {
|
||||
self.0.swap_buffers()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user