Skip to content

Commit

Permalink
fix(game/client): crash from missing SET_GAME_FOCUS event handler
Browse files Browse the repository at this point in the history
  • Loading branch information
itschip committed Jan 15, 2024
1 parent cf55c32 commit f247cd6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions apps/game/client/cl_main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,12 @@ RegisterNuiCB<{ keepGameFocus: boolean }>(
},
);


// If you want to remove controls from a external application this is the way to do it.
on(PhoneEvents.SET_GAME_FOCUS, (keepGameFocus: boolean) => {
// chip - commenting this out because it crashed the phone for some reason, even though it's not used anywhere??? like...we dont emit it
/* on(PhoneEvents.SET_GAME_FOCUS, (keepGameFocus: boolean) => {
if (global.isPhoneOpen) SetNuiFocusKeepInput(keepGameFocus);
});
}); */

/* * * * * * * * * * * * *
*
Expand Down

0 comments on commit f247cd6

Please sign in to comment.