Skip to content

Commit de79a13

Browse files
Merge remote-tracking branch 'dhewm3/master'
2 parents 6872d13 + 00e82ec commit de79a13

File tree

5 files changed

+22
-4
lines changed

5 files changed

+22
-4
lines changed

.github/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ Note: Numbers starting with a "#" like #330 refer to the bugreport with that num
7070
* Fixed a crash when using an incomplete cubemap texture (missing one side).
7171
Will now print a warning about the missing side.
7272
* Fix wrong (flipped) labels of Prev./Next Weapon in dhewm3 settings menu (#731)
73+
* Gamepad trigger axes can now also be used for ducking and jumping (#733)
7374
* Several smaller fixes for all kinds of things incl. build issues
7475

7576

docs/GUIs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -644,12 +644,12 @@ windowDef Desktop {
644644
}
645645
```
646646

647-
This sets an unstretched(!) background texture over the whole screen, repeating as aften as
647+
This sets an unstretched(!) background texture over the whole screen, repeating as often as
648648
necessary to fit the screen. Wouldn't have been possible without the new variables and CstDoom3's
649649
anchor system!
650650

651651
Another usecase is to display things only in the "letter-box" bars, if you anchor the main part
652-
of your menu to the center (especially useful when modifying existing comples GUIs, like the Doom3
652+
of your menu to the center (especially useful when modifying existing complex GUIs, like the Doom3
653653
mainmenu, to be widescreen-friendly). For example, if your existing menu has a half-translucent
654654
grey bar on the bottom of the centered area (kinda like the doom3 main menu...), and you want to
655655
continue that to the borders of the screen, you could add something like:

neo/framework/Common.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3001,6 +3001,15 @@ void idCommonLocal::Init( int argc, char **argv ) {
30013001
* * https://github.com/libsdl-org/SDL/issues/4039
30023002
* * https://github.com/libsdl-org/SDL/issues/3656 */
30033003
SDL_SetHint( SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS, "1" );
3004+
#ifdef SDL_HINT_ENABLE_SCREEN_KEYBOARD
3005+
SDL_SetHint( SDL_HINT_ENABLE_SCREEN_KEYBOARD, "0" );
3006+
#else
3007+
// fallback for older SDL2 versions, maybe at least the runtime version is new enough
3008+
// for this hint if the compile time SDL2 version wasn't (and if not this won't hurt)
3009+
if (SDL_getenv("SDL_ENABLE_SCREEN_KEYBOARD") == NULL) {
3010+
SDL_setenv("SDL_ENABLE_SCREEN_KEYBOARD", "0", 0);
3011+
}
3012+
#endif
30043013
#endif
30053014

30063015
try {

neo/framework/Dhewm3SettingsMenu.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2360,7 +2360,15 @@ static CVarOption gameOptions[] = {
23602360
CVarOption( "ui_autoSwitch", "Auto Weapon Switch", OT_BOOL ),
23612361
CVarOption( "Visual" ),
23622362
CVarOption( "g_showHud", "Show HUD", OT_BOOL ),
2363-
CVarOption( "com_showFPS", "Show Framerate (FPS)", OT_BOOL ),
2363+
CVarOption( "com_showFPS", []( idCVar& cvar ) {
2364+
int curFormat = idMath::ClampInt( 0, 2, cvar.GetInteger() );
2365+
const char* choices = "Don't show framerate\0Show only framerate\0Show framerate and frame times (avg/min/max)\0";
2366+
if ( ImGui::Combo( "Show Framerate (FPS)", &curFormat, choices ) ) {
2367+
cvar.SetInteger( curFormat );
2368+
}
2369+
AddTooltip( "com_showFPS" );
2370+
AddDescrTooltip( cvar.GetDescription() );
2371+
} ),
23642372
CVarOption( "ui_showGun", "Show Gun Model", OT_BOOL ),
23652373
CVarOption( "g_decals", "Show Decals", OT_BOOL ),
23662374
CVarOption( "g_bloodEffects", "Show Blood and Gibs", OT_BOOL ),

neo/renderer/tr_local.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1114,7 +1114,7 @@ void GLimp_DeactivateContext( void );
11141114
const int GRAB_GRABMOUSE = (1 << 0);
11151115
const int GRAB_HIDECURSOR = (1 << 1);
11161116
const int GRAB_RELATIVEMOUSE = (1 << 2);
1117-
const int GRAB_ENABLETEXTINPUT = (1 << 3); // only used with SDL3, where textinput must be explicitly activated
1117+
const int GRAB_ENABLETEXTINPUT = (1 << 3); // to explicitly enable/disable textinput in SDL2/3
11181118

11191119
void GLimp_GrabInput(int flags);
11201120

0 commit comments

Comments
 (0)