Skip to content

Commit

Permalink
Fixed crash on start-up caused by save folder not existing yet.
Browse files Browse the repository at this point in the history
  • Loading branch information
ReFreezed committed May 31, 2020
1 parent 5f828b6 commit ad810af
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/build.gloa
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ local doRelease :: () {
appNameShort = "Hot Particles", -- Should be less than 16 characters long.
appNameInternal = "Hot Particles",

appVersion = "1.0.0",
appVersion = "1.0.1",
appVersionMajor = "1",
appVersionMinor = "0",
appVersionPatch = "0",
appVersionPatch = "1",
appIdentifier = "com.refreezed.hotparticles",

companyName = "",
Expand Down
6 changes: 3 additions & 3 deletions src/main.gloa
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
local GIF_RECORDING_MODE :: DEV and 1==1
local GIF_FRAME_DELAY :: 2 -- 100th of a second.

export APP_VERSION_STRING :: "1.0.0" -- @Cleanup: Put this in an external file and use it in build.gloa too.
export APP_VERSION_STRING :: "1.0.1" -- @Cleanup: Put this in an external file and use it in build.gloa too.

export MAX_BUFFER_SIZE :: 16000 -- Default buffer size for ParticleSystem is 1000. @Incomplete: Make this configurable.
export MAIN_PANEL_WIDTH :: 450
Expand Down Expand Up @@ -800,12 +800,12 @@ local onLoad :: (args:[]string, argsRaw:[]string) {

LK.setKeyRepeat(true)

LF.createDirectory("projects") -- Must happen before physfs stuff so the save folder exists.

defaultSearchPaths = physfs.getSearchPaths()
!if not DEV insert(defaultSearchPaths, getAppDirectory())
disconnectFromRemoteDirectory() -- Resets paths. We didn't actually connect.

LF.createDirectory("projects")

dummyCursors[LM.CursorType.ARROW] = {hotX=2, hotY=2, data=LI.newImageData("gfx/cursor_arrow.png")}
dummyCursors[LM.CursorType.I_BEAM] = {hotX=4, hotY=9, data=LI.newImageData("gfx/cursor_ibeam.png")}
dummyCursors[LM.CursorType.SIZE_VERTICAL] = {hotX=6, hotY=12, data=LI.newImageData("gfx/cursor_sizens.png")}
Expand Down

0 comments on commit ad810af

Please sign in to comment.