@@ -226,7 +226,7 @@ unsafe fn setup_pixel_format(dc: Gdi::HDC) -> Result<(), crate::InstanceError> {
226
226
if index == 0 {
227
227
return Err ( crate :: InstanceError :: with_source (
228
228
String :: from ( "unable to choose pixel format" ) ,
229
- Error :: from_win32 ( ) ,
229
+ Error :: from_thread ( ) ,
230
230
) ) ;
231
231
}
232
232
@@ -244,7 +244,7 @@ unsafe fn setup_pixel_format(dc: Gdi::HDC) -> Result<(), crate::InstanceError> {
244
244
if index == 0 {
245
245
return Err ( crate :: InstanceError :: with_source (
246
246
String :: from ( "unable to get pixel format index" ) ,
247
- Error :: from_win32 ( ) ,
247
+ Error :: from_thread ( ) ,
248
248
) ) ;
249
249
}
250
250
let mut format = Default :: default ( ) ;
@@ -254,7 +254,7 @@ unsafe fn setup_pixel_format(dc: Gdi::HDC) -> Result<(), crate::InstanceError> {
254
254
{
255
255
return Err ( crate :: InstanceError :: with_source (
256
256
String :: from ( "unable to read pixel format" ) ,
257
- Error :: from_win32 ( ) ,
257
+ Error :: from_thread ( ) ,
258
258
) ) ;
259
259
}
260
260
@@ -311,7 +311,7 @@ fn create_global_window_class() -> Result<CString, crate::InstanceError> {
311
311
if atom == 0 {
312
312
return Err ( crate :: InstanceError :: with_source (
313
313
String :: from ( "unable to register window class" ) ,
314
- Error :: from_win32 ( ) ,
314
+ Error :: from_thread ( ) ,
315
315
) ) ;
316
316
}
317
317
@@ -398,7 +398,7 @@ fn create_instance_device() -> Result<InstanceDevice, crate::InstanceError> {
398
398
if dc. is_invalid ( ) {
399
399
return Err ( crate :: InstanceError :: with_source (
400
400
String :: from ( "unable to create memory device" ) ,
401
- Error :: from_win32 ( ) ,
401
+ Error :: from_thread ( ) ,
402
402
) ) ;
403
403
}
404
404
let dc = DeviceContextHandle {
@@ -484,7 +484,7 @@ impl crate::Instance for Instance {
484
484
if context. is_null ( ) {
485
485
return Err ( crate :: InstanceError :: with_source (
486
486
String :: from ( "unable to create OpenGL context" ) ,
487
- Error :: from_win32 ( ) ,
487
+ Error :: from_thread ( ) ,
488
488
) ) ;
489
489
}
490
490
WglContext {
@@ -676,7 +676,7 @@ impl Surface {
676
676
if dc. is_invalid ( ) {
677
677
log:: error!(
678
678
"unable to get the device context from window: {}" ,
679
- Error :: from_win32 ( )
679
+ Error :: from_thread ( )
680
680
) ;
681
681
return Err ( crate :: SurfaceError :: Other (
682
682
"unable to get the device context from window" ,
@@ -754,7 +754,7 @@ impl crate::Surface for Surface {
754
754
if dc. is_invalid ( ) {
755
755
log:: error!(
756
756
"unable to get the device context from window: {}" ,
757
- Error :: from_win32 ( )
757
+ Error :: from_thread ( )
758
758
) ;
759
759
return Err ( crate :: SurfaceError :: Other (
760
760
"unable to get the device context from window" ,
@@ -828,7 +828,7 @@ impl crate::Surface for Surface {
828
828
} ;
829
829
830
830
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 ( ) ) ;
832
832
return Err ( crate :: SurfaceError :: Other ( "unable to set swap interval" ) ) ;
833
833
}
834
834
0 commit comments