Small improvement to is_game_paused()
This commit is contained in:
parent
627ea49c14
commit
948f2bfe23
|
@ -170,7 +170,7 @@ extern s16 gMenuMode;
|
||||||
static void controller_sdl_read(OSContPad *pad) {
|
static void controller_sdl_read(OSContPad *pad) {
|
||||||
if (!init_ok) { return; }
|
if (!init_ok) { return; }
|
||||||
|
|
||||||
if ((newcam_mouse == 1 || get_first_person_enabled() || gDjuiHudLockMouse) && gMenuMode == -1 && !gDjuiInMainMenu && !gDjuiChatBoxFocus && !gDjuiConsoleFocus && WAPI.has_focus()) {
|
if ((newcam_mouse == 1 || get_first_person_enabled() || gDjuiHudLockMouse) && !is_game_paused() && !gDjuiInMainMenu && !gDjuiChatBoxFocus && !gDjuiConsoleFocus && WAPI.has_focus()) {
|
||||||
controller_mouse_enter_relative();
|
controller_mouse_enter_relative();
|
||||||
} else {
|
} else {
|
||||||
controller_mouse_leave_relative();
|
controller_mouse_leave_relative();
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "pc/djui/djui_console.h"
|
#include "pc/djui/djui_console.h"
|
||||||
#include "pc/djui/djui_hud_utils.h"
|
#include "pc/djui/djui_hud_utils.h"
|
||||||
#include "pc/djui/djui_panel_playerlist.h"
|
#include "pc/djui/djui_panel_playerlist.h"
|
||||||
|
#include "pc/djui/djui_panel_pause.h"
|
||||||
#include "game/skybox.h"
|
#include "game/skybox.h"
|
||||||
#include "pc/gfx/gfx_pc.h"
|
#include "pc/gfx/gfx_pc.h"
|
||||||
#include "include/course_table.h"
|
#include "include/course_table.h"
|
||||||
|
@ -264,7 +265,7 @@ void hud_set_flash(s8 value) {
|
||||||
|
|
||||||
extern s16 gMenuMode;
|
extern s16 gMenuMode;
|
||||||
bool is_game_paused(void) {
|
bool is_game_paused(void) {
|
||||||
return gMenuMode != -1;
|
return gMenuMode != -1 || gDjuiPanelPauseCreated;
|
||||||
}
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
|
|
Loading…
Reference in New Issue