Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Game Development
  4. QGameManager does it ever stop?
Qt 6.11 is out! See what's new in the release blog

QGameManager does it ever stop?

Scheduled Pinned Locked Moved Unsolved Game Development
4 Posts 3 Posters 1.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Audetto
    wrote on last edited by
    #1

    Hi,

    I have a question about QGamepadManager.
    I seem to understand that as soon as I call QGamepadManager::instance() it will start listening for all joystick events and firing signals until the application shuts down, even if there are no QGamepads around.

    I can't really say if this is a noticeable overhead, but I wonder if there is a way to stop it.

    Andrea

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      From a quick look at the sources of that class, I'd say no.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • JonBJ Offline
        JonBJ Offline
        JonB
        wrote on last edited by
        #3

        I'm totally throwing a thought in, as I know nothing about this(!), but if connectedGamepads() returns 0 are you able to get rid of the instance() ?

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          instance returns the address of a static "stack" object so no you can't.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          1

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved