@@ -226,7 +226,7 @@ unsafe fn setup_pixel_format(dc: Gdi::HDC) -> Result<(), crate::InstanceError> {
226226 if index == 0 {
227227 return Err ( crate :: InstanceError :: with_source (
228228 String :: from ( "unable to choose pixel format" ) ,
229- Error :: from_win32 ( ) ,
229+ Error :: from_thread ( ) ,
230230 ) ) ;
231231 }
232232
@@ -244,7 +244,7 @@ unsafe fn setup_pixel_format(dc: Gdi::HDC) -> Result<(), crate::InstanceError> {
244244 if index == 0 {
245245 return Err ( crate :: InstanceError :: with_source (
246246 String :: from ( "unable to get pixel format index" ) ,
247- Error :: from_win32 ( ) ,
247+ Error :: from_thread ( ) ,
248248 ) ) ;
249249 }
250250 let mut format = Default :: default ( ) ;
@@ -254,7 +254,7 @@ unsafe fn setup_pixel_format(dc: Gdi::HDC) -> Result<(), crate::InstanceError> {
254254 {
255255 return Err ( crate :: InstanceError :: with_source (
256256 String :: from ( "unable to read pixel format" ) ,
257- Error :: from_win32 ( ) ,
257+ Error :: from_thread ( ) ,
258258 ) ) ;
259259 }
260260
@@ -311,7 +311,7 @@ fn create_global_window_class() -> Result<CString, crate::InstanceError> {
311311 if atom == 0 {
312312 return Err ( crate :: InstanceError :: with_source (
313313 String :: from ( "unable to register window class" ) ,
314- Error :: from_win32 ( ) ,
314+ Error :: from_thread ( ) ,
315315 ) ) ;
316316 }
317317
@@ -398,7 +398,7 @@ fn create_instance_device() -> Result<InstanceDevice, crate::InstanceError> {
398398 if dc. is_invalid ( ) {
399399 return Err ( crate :: InstanceError :: with_source (
400400 String :: from ( "unable to create memory device" ) ,
401- Error :: from_win32 ( ) ,
401+ Error :: from_thread ( ) ,
402402 ) ) ;
403403 }
404404 let dc = DeviceContextHandle {
@@ -484,7 +484,7 @@ impl crate::Instance for Instance {
484484 if context. is_null ( ) {
485485 return Err ( crate :: InstanceError :: with_source (
486486 String :: from ( "unable to create OpenGL context" ) ,
487- Error :: from_win32 ( ) ,
487+ Error :: from_thread ( ) ,
488488 ) ) ;
489489 }
490490 WglContext {
@@ -676,7 +676,7 @@ impl Surface {
676676 if dc. is_invalid ( ) {
677677 log:: error!(
678678 "unable to get the device context from window: {}" ,
679- Error :: from_win32 ( )
679+ Error :: from_thread ( )
680680 ) ;
681681 return Err ( crate :: SurfaceError :: Other (
682682 "unable to get the device context from window" ,
@@ -754,7 +754,7 @@ impl crate::Surface for Surface {
754754 if dc. is_invalid ( ) {
755755 log:: error!(
756756 "unable to get the device context from window: {}" ,
757- Error :: from_win32 ( )
757+ Error :: from_thread ( )
758758 ) ;
759759 return Err ( crate :: SurfaceError :: Other (
760760 "unable to get the device context from window" ,
@@ -828,7 +828,7 @@ impl crate::Surface for Surface {
828828 } ;
829829
830830 if unsafe { extra. SwapIntervalEXT ( if vsync { 1 } else { 0 } ) } == Foundation :: FALSE . 0 {
831- log:: error!( "unable to set swap interval: {}" , Error :: from_win32 ( ) ) ;
831+ log:: error!( "unable to set swap interval: {}" , Error :: from_thread ( ) ) ;
832832 return Err ( crate :: SurfaceError :: Other ( "unable to set swap interval" ) ) ;
833833 }
834834
0 commit comments