Execute "bind.cfg" on startup

Users could put custom binds in here.
I also unbound all dev-only binds by default to suppress warnings or prevent issues.
This commit is contained in:
Kawe Mazidjatari 2022-11-10 15:42:27 +01:00
parent 32a158903f
commit 3511aff224
2 changed files with 18 additions and 0 deletions

View File

@ -329,6 +329,9 @@ FORCEINLINE void CHostState::LoadConfig(void) const
#endif // !DEDICATED
Cbuf_AddText(Cbuf_GetCurrentPlayer(), "exec \"autoexec_dev.cfg\"", cmd_source_t::kCommandSrcCode);
}
#ifndef DEDICATED
Cbuf_AddText(Cbuf_GetCurrentPlayer(), "exec \"bind.cfg\"", cmd_source_t::kCommandSrcCode);
#endif // !DEDICATED
Cbuf_Execute();
}
}

View File

@ -0,0 +1,15 @@
///////////////// input_system configuration file.
// This file is executed automatically on startup.
////////////////////////////////
//// DO NOT SHIP (DEV-ONLY) ////
////////////////////////////////
unbind_US_standard "`" // "toggleconsole" (script-only).
unbind_US_standard "f10" // "screenshotDevNet_noRPROF" (dev-only).
unbind_US_standard "f12" // "screenshotDevNet" (dev-only).
//////////////////////////
//// UTILITY ////
//////////////////////////
bind_US_standard "f11" "screenshot" 0 // Take screenshot TGA screenshot.
bind_US_standard "f12" "jpeg" 0 // Take screenshot JPG screenshot.