Git Product home page Git Product logo

Comments (2)

veeenu avatar veeenu commented on August 12, 2024

Would this work (in place of this)?

let want_capture = io.want_capture_mouse || io.want_capture_keyboard;
let wnd_proc = imgui_renderer.wnd_proc;
drop(imgui_renderer);

if want_capture {
    trace!("Leaving WndProc via capturing");
    LRESULT(1)
} else {
    trace!("Leaving WndProc via CallWindowProcW");
    CallWindowProcW(Some(wnd_proc), hwnd, umsg, WPARAM(wparam), LPARAM(lparam))
}

This should capture inputs in the way intended by imgui, and does not need to rely on augmenting the trait. Unfortunately it doesn't work for me as the games I built this for (DS3 & Elden Ring) seemingly don't even go through WndProc for gathering their input, but it is also not a problem for those so I can include it without introducing regressions.

It's already in master.

from hudhook.

OneXDeveloper avatar OneXDeveloper commented on August 12, 2024

Yes, I think that would solve my case. I was opting for the trait the method to make it a bit more flexible for other use cases but it may not be needed. Awesome! Thanks again

from hudhook.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.