Unverified Commit 67e775e9 authored by RobLoach's avatar RobLoach Committed by GitHub
Browse files

Merge pull request #356 from libretro/dev

0.31.0
parents 73baadef d40121eb
...@@ -6,16 +6,16 @@ matrix: ...@@ -6,16 +6,16 @@ matrix:
- os: linux - os: linux
dist: trusty dist: trusty
sudo: required sudo: required
before_install:
- sudo apt-get -qq update
- sudo apt-get install g++-7 binutils-2.26
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 90
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 90
- export PATH=/usr/lib/binutils-2.26/bin:${PATH}
- os: osx - os: osx
osx_image: xcode8.3 osx_image: xcode8.3
before_install:
- if [[ "$TRAVIS_OS_NAME" != "osx" ]]; then sudo apt-get -qq update ; fi
- if [[ "$TRAVIS_OS_NAME" != "osx" ]]; then sudo apt-get install g++-7 binutils-2.26 ; fi
- if [[ "$TRAVIS_OS_NAME" != "osx" ]]; then sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 90 ; fi
- if [[ "$TRAVIS_OS_NAME" != "osx" ]]; then sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 90 ; fi
- if [[ "$TRAVIS_OS_NAME" != "osx" ]]; then export PATH=/usr/lib/binutils-2.26/bin:${PATH} ; fi
addons: addons:
apt: apt:
sources: sources:
......
...@@ -4,6 +4,13 @@ All notable changes to [ChaiLove](https://github.com/RobLoach/ChaiLove) will be ...@@ -4,6 +4,13 @@ All notable changes to [ChaiLove](https://github.com/RobLoach/ChaiLove) will be
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) 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). and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
## 0.31.0 - 2018-12-24
### Chores
- Update to use the libretro audio callback
- Updated cppcodec
- Updated PhysFS
- Updated libretro-common
## 0.30.0 - 2018-11-14 ## 0.30.0 - 2018-11-14
### Features ### Features
- Added support for classic_armv7_a7 - Added support for classic_armv7_a7
......
...@@ -23,7 +23,7 @@ PROJECT_NAME = "ChaiLove API" ...@@ -23,7 +23,7 @@ PROJECT_NAME = "ChaiLove API"
# This could be handy for archiving the generated documentation or # This could be handy for archiving the generated documentation or
# if some version control system is used. # if some version control system is used.
PROJECT_NUMBER = "0.30.0" PROJECT_NUMBER = "0.31.0"
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put. # base path where the generated documentation will be put.
......
...@@ -169,9 +169,6 @@ std::string ChaiLove::demo() { ...@@ -169,9 +169,6 @@ std::string ChaiLove::demo() {
} }
void ChaiLove::update() { void ChaiLove::update() {
// Update the sound system.
sound.update();
// Update and poll all the events. // Update and poll all the events.
event.update(); event.update();
......
...@@ -23,11 +23,9 @@ ...@@ -23,11 +23,9 @@
* This is the full source for "hello world" in ChaiLove, using a `main.chai` file. Running this code will cause an 640 by 480 window to appear, and display white text on a black background. * This is the full source for "hello world" in ChaiLove, using a `main.chai` file. Running this code will cause an 640 by 480 window to appear, and display white text on a black background.
* *
* @code * @code
* global logo
* global x = 10.0f
*
* def load() { * def load() {
* logo = love.graphics.newImage("logo.png") * global logo = love.graphics.newImage("logo.png")
* global x = 10.0f
* } * }
* *
* def draw() { * def draw() {
...@@ -47,9 +45,9 @@ ...@@ -47,9 +45,9 @@
#define SRC_CHAILOVE_H_ #define SRC_CHAILOVE_H_
#define CHAILOVE_VERSION_MAJOR 0 #define CHAILOVE_VERSION_MAJOR 0
#define CHAILOVE_VERSION_MINOR 30 #define CHAILOVE_VERSION_MINOR 31
#define CHAILOVE_VERSION_PATCH 0 #define CHAILOVE_VERSION_PATCH 0
#define CHAILOVE_VERSION_STRING "0.30.0" #define CHAILOVE_VERSION_STRING "0.31.0"
#include "SDL.h" #include "SDL.h"
#include "libretro.h" #include "libretro.h"
......
...@@ -309,6 +309,22 @@ void frame_time_cb(retro_usec_t usec) { ...@@ -309,6 +309,22 @@ void frame_time_cb(retro_usec_t usec) {
} }
} }
/**
* libretro callback; Step the audio forwards a step.
*/
void retro_audio_cb() {
// Update the sound system.
ChaiLove::getInstance()->sound.update();
}
/**
* libretro callback; Set the current state of the audio.
*/
void audio_set_state(bool enabled) {
// TODO(RobLoach): Act on whether or not audio is enabled/disabled?
std::cout << "[ChaiLove] audio_set_state(" << (enabled ? "true" : "false") << ")" << std::endl;
}
/** /**
* libretro callback; Load the given game. * libretro callback; Load the given game.
*/ */
...@@ -323,6 +339,10 @@ bool retro_load_game(const struct retro_game_info *info) { ...@@ -323,6 +339,10 @@ bool retro_load_game(const struct retro_game_info *info) {
struct retro_frame_time_callback frame_cb = { frame_time_cb, 1000000 / 60 }; struct retro_frame_time_callback frame_cb = { frame_time_cb, 1000000 / 60 };
ChaiLove::environ_cb(RETRO_ENVIRONMENT_SET_FRAME_TIME_CALLBACK, &frame_cb); ChaiLove::environ_cb(RETRO_ENVIRONMENT_SET_FRAME_TIME_CALLBACK, &frame_cb);
// Set the audio callback.
struct retro_audio_callback retro_audio = { retro_audio_cb, audio_set_state };
ChaiLove::environ_cb(RETRO_ENVIRONMENT_SET_AUDIO_CALLBACK, &retro_audio);
// Find the game path. // Find the game path.
std::string gamePath(info ? info->path : ""); std::string gamePath(info ? info->path : "");
if (gamePath == ".") { if (gamePath == ".") {
......
Subproject commit 82d011756adfece7506728b4fa9e7354cbe58641 Subproject commit bd6ddf95129e769b50ef63e0f558fa21364f3f65
Subproject commit 3ae84ee5d0a0af72a6a808a32b63e1ea0076f2be Subproject commit 58f9c0f558a8e74fe0bfafd1a1e3bdacb5841168
Subproject commit 87ae44c172d7c8e04c64e26fdda868508582b4f6 Subproject commit 33c632195f54d2ce0be34c56f98bb1a2a4c98831
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