Verified Commit 6795e0f3 authored by RobLoach's avatar RobLoach
Browse files

Fix nogame

parent 856cf6b0
......@@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
## 0.26.2 - Unreleased
### Fixes
- Fixed loading ChaiLove without active content
## 0.26.1 - 2018-09-19
### Fixes
......
......@@ -140,6 +140,8 @@ std::string ChaiLove::demo() {
love.graphics.print(text, 10, love.graphics.getHeight() / 2.0f - 100)
var ver = love.system.getVersionString()
love.graphics.print(ver, love.graphics.getWidth() - defaultFont.getWidth(ver), love.graphics.getHeight() - defaultFont.getHeight(ver) * 2.0f)
love.graphics.print("FPS: " + to_string(love.timer.getFPS()), 10, love.graphics.getHeight() - defaultFont.getHeight(ver) * 2.0f)
}
def update(dt) {
......
......@@ -328,7 +328,11 @@ bool retro_load_game(const struct retro_game_info *info) {
if (gamePath == ".") {
gamePath = "main.chai";
}
return ChaiLove::getInstance()->load(gamePath, info->data);
void* data = NULL;
if (info != NULL) {
data = (void*)info->data;
}
return ChaiLove::getInstance()->load(gamePath, data);
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment