mirror of
https://github.com/love2d/love.git
synced 2026-08-20 12:40:20 +02:00
Fix fused games
This commit is contained in:
@@ -20,6 +20,8 @@
|
|||||||
|
|
||||||
#include <common/config.h>
|
#include <common/config.h>
|
||||||
|
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
#include <common/utf8.h>
|
#include <common/utf8.h>
|
||||||
#include <common/b64.h>
|
#include <common/b64.h>
|
||||||
|
|
||||||
@@ -52,6 +54,7 @@ namespace physfs
|
|||||||
|
|
||||||
void Filesystem::init(const char * arg0)
|
void Filesystem::init(const char * arg0)
|
||||||
{
|
{
|
||||||
|
std::cout<<arg0 <<std::endl;
|
||||||
if(!PHYSFS_init(arg0))
|
if(!PHYSFS_init(arg0))
|
||||||
throw Exception(PHYSFS_getLastError());
|
throw Exception(PHYSFS_getLastError());
|
||||||
isInited = true;
|
isInited = true;
|
||||||
|
|||||||
@@ -193,11 +193,12 @@ function love.boot()
|
|||||||
|
|
||||||
local o = love.arg.options
|
local o = love.arg.options
|
||||||
|
|
||||||
local abs_arg0 = love.path.getfull(love.arg.getLow(arg))
|
--local abs_arg0 = love.path.getfull(love.arg.getLow(arg))
|
||||||
love.filesystem.init(abs_arg0)
|
--love.filesystem.init(abs_arg0)
|
||||||
|
love.filesystem.init(love.arg.getLow(arg))
|
||||||
|
|
||||||
-- Is this one of those fancy "fused" games?
|
-- Is this one of those fancy "fused" games?
|
||||||
local can_has_game = love.filesystem.isFile(abs_arg0) and not love.filesystem.isDirectory(abs_arg0) and pcall(love.filesystem.setSource, abs_arg0)
|
local can_has_game = pcall(love.filesystem.setSource, abs_arg0)
|
||||||
|
|
||||||
if not can_has_game and o.game.set and o.game.arg[1] then
|
if not can_has_game and o.game.set and o.game.arg[1] then
|
||||||
local full_source = love.path.getfull(o.game.arg[1])
|
local full_source = love.path.getfull(o.game.arg[1])
|
||||||
|
|||||||
+1944
-1947
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user