mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-02-24 23:22:25 +01:00
byuu says: Changelog: - WS/WSC: re-added support for screen rotation (code is inside WS core) - ruby: changed sample(uint16_t left, uint16_t right) to sample(int16_t left, int16_t right); - requires casting to uint prior to shifting in each driver, but I felt it was misleading to use uint16_t just to avoid that - ruby: WASAPI is now built in by default; has wareya's improvements, and now supports latency adjust - tomoko: audio settings panel has new "Exclusive Mode" checkbox for WASAPI driver only - note: although the setting *does* take effect in real-time, I'd suggest restarting the emulator after changing it - tomoko: audio latency can now be set to 0ms (which in reality means "the minimum supported by the driver") - all: increased cothread size from 512KiB to 2MiB to see if it fixes bullshit AMD driver crashes - this appears to cause a slight speed penalty due to cache locality going down between threads, though
49 lines
1.5 KiB
C++
49 lines
1.5 KiB
C++
#pragma once
|
|
|
|
#include <nall/nall.hpp>
|
|
using namespace nall;
|
|
|
|
#include <audio/audio.hpp>
|
|
#include <video/video.hpp>
|
|
|
|
namespace Emulator {
|
|
static const string Name = "higan";
|
|
static const string Version = "098.05";
|
|
static const string Author = "byuu";
|
|
static const string License = "GPLv3";
|
|
static const string Website = "http://byuu.org/";
|
|
}
|
|
|
|
#include "interface.hpp"
|
|
|
|
//debugging function hook:
|
|
//no overhead (and no debugger invocation) if not compiled with -DDEBUGGER
|
|
//wraps testing of function to allow invocation without a defined callback
|
|
template<typename T> struct hook;
|
|
template<typename R, typename... P> struct hook<auto (P...) -> R> {
|
|
function<auto (P...) -> R> callback;
|
|
|
|
auto operator()(P... p) const -> R {
|
|
#if defined(DEBUGGER)
|
|
if(callback) return callback(forward<P>(p)...);
|
|
#endif
|
|
return R();
|
|
}
|
|
|
|
hook() {}
|
|
hook(const hook& hook) { callback = hook.callback; }
|
|
hook(void* function) { callback = function; }
|
|
hook(auto (*function)(P...) -> R) { callback = function; }
|
|
template<typename C> hook(auto (C::*function)(P...) -> R, C* object) { callback = {function, object}; }
|
|
template<typename C> hook(auto (C::*function)(P...) const -> R, C* object) { callback = {function, object}; }
|
|
template<typename L> hook(const L& function) { callback = function; }
|
|
|
|
auto operator=(const hook& source) -> hook& { callback = source.callback; return *this; }
|
|
};
|
|
|
|
#if defined(DEBUGGER)
|
|
#define privileged public
|
|
#else
|
|
#define privileged private
|
|
#endif
|