SDL2: Automatic pause when exit to home

Post Reply
jenergy
Posts: 2
Joined: Sun Apr 11, 2010 5:52 pm

SDL2: Automatic pause when exit to home

Post by jenergy » Mon Mar 09, 2020 10:41 pm

Hello,
I'm working on a port on the switch of a project written in pure c, using LIBSDL2.
All works good, except that when pressing home button, to go back to main Switch screen, my program still goes on. I'd like to automatic pause it instead, and to resume it on reclick.
Which is the best way to obtain this behaviour?
The 'pause' behaviour is already implemented in my application, so I can call it, if I only could catch the event <button home clicked>..so how can I intercept this event?
Maybe that's an SDL2 management?
Thank you

WinterMute
Site Admin
Posts: 1986
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: SDL2: Automatic pause when exit to home

Post by WinterMute » Tue Apr 07, 2020 12:50 pm

It's not possible to intercept the home button event, sorry.
Help keep devkitPro toolchains free, Donate today

Personal Blog

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests