Skip to content

Commit

Permalink
Merge pull request #200 from JamesTKhan/fps-argument
Browse files Browse the repository at this point in the history
Add FPS launch argument
  • Loading branch information
JamesTKhan authored Jul 17, 2023
2 parents 7e85eb7 + 77906b8 commit aaa770f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions editor/CHANGES
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[0.5.1]
- Added FPS launcher argument, always call setForegroundFPS
- Fix mouse picking by not rendering inactive game objects to picker
- Fix removed terrain in helper lines
- Fix undo removed light component on selected game object
Expand Down
4 changes: 4 additions & 0 deletions editor/src/main/com/mbrlabs/mundus/editor/Main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ class LaunchOptions {

@Option(name="-noShaderCache", usage="Disable shader preprocessor caching, useful for hot reloads during shader development")
var noShaderCache = false

@Option(name="-fpsLimit", usage="Set FPS limit")
var fps = 60 // Default to 60 FPS limit (ex -fpsLimit=30)
}

fun main(arg: Array<String>) {
Expand Down Expand Up @@ -86,6 +89,7 @@ private fun launchEditor(options: LaunchOptions) {
config.setWindowSizeLimits(1350, 1, 9999, 9999)
config.setWindowPosition(-1, -1)
config.setWindowIcon("icon/logo.png")
config.setForegroundFPS(options.fps)

if (options.useGL30) {
if (SharedLibraryLoader.isMac) {
Expand Down

0 comments on commit aaa770f

Please sign in to comment.