File tree Expand file tree Collapse file tree 3 files changed +18
-3
lines changed
Expand file tree Collapse file tree 3 files changed +18
-3
lines changed Original file line number Diff line number Diff line change 6262 runs-on : ubuntu-latest
6363 steps :
6464 - name : Download artifacts
65- uses : actions/download-artifact@v3
65+ uses : actions/download-artifact@v4.3.0
6666 with :
6767 path : artifacts
6868
Original file line number Diff line number Diff line change @@ -322,3 +322,15 @@ unsafe fn hook_wgl_swap_buffers() {
322322 ORIGINAL_WGL_SWAPBUFFERS . set ( detour) . unwrap ( ) ;
323323 println ! ( "[WaspInput]: wglSwapBuffers successfully hooked.\r \n " ) ;
324324}
325+
326+ pub unsafe fn unhook_wgl_swap_buffers ( ) {
327+ let detour = ORIGINAL_WGL_SWAPBUFFERS
328+ . get ( )
329+ . expect ( "[WaspInput]: wglSwapBuffers hook not found\r \n " ) ;
330+
331+ detour
332+ . disable ( )
333+ . expect ( "[WaspInput]: Failed to disable wglSwapBuffers hook\r \n " ) ;
334+
335+ println ! ( "[WaspInput]: wglSwapBuffers successfully unhooked.\r \n " ) ;
336+ }
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ use windows::{
4040 } ,
4141} ;
4242
43- use crate :: client:: client:: { start_thread, unhook_wndproc} ;
43+ use crate :: client:: client:: { start_thread, unhook_wgl_swap_buffers , unhook_wndproc} ;
4444
4545use super :: memory:: { MemoryManager , MEMORY_MANAGER } ;
4646
@@ -85,7 +85,10 @@ pub extern "system" fn DllMain(
8585 } ,
8686 0 => {
8787 println ! ( "[WaspInput]: Detached.\r \n " ) ;
88- unsafe { unhook_wndproc ( hwnd. 0 as u64 ) } ;
88+ unsafe {
89+ unhook_wndproc ( hwnd. 0 as u64 ) ;
90+ unhook_wgl_swap_buffers ( ) ;
91+ } ;
8992 }
9093 _ => ( ) ,
9194 }
You can’t perform that action at this time.
0 commit comments