Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9,275 changes: 7,238 additions & 2,037 deletions bsnes/gb/libretro/libretro.h

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion bsnes/gb/libretro/retro_inline.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,15 @@

#ifndef INLINE

/**
* Cross-platform inline specifier.
*
* Expands to something like \c __inline or \c inline,
* depending on the compiler.
*/
#if defined(_WIN32) || defined(__INTEL_COMPILER)
#define INLINE __inline
#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#elif defined(__STDC_VERSION__) && __STDC_VERSION__>=199901L
#define INLINE inline
#elif defined(__GNUC__)
#define INLINE __inline__
Expand Down
6 changes: 6 additions & 0 deletions bsnes/target-libretro/libretro-common/include/retro_inline.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@

#ifndef INLINE

/**
* Cross-platform inline specifier.
*
* Expands to something like \c __inline or \c inline,
* depending on the compiler.
*/
#if defined(_WIN32) || defined(__INTEL_COMPILER)
#define INLINE __inline
#elif defined(__STDC_VERSION__) && __STDC_VERSION__>=199901L
Expand Down
11 changes: 11 additions & 0 deletions bsnes/target-libretro/libretro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ static bool ppu_fast_options = true;
#define VIDEO_WIDTH 256
#define VIDEO_HEIGHT 240

struct retro_vfs_interface *libretro_vfs_interface = nullptr;

static double get_aspect_ratio()
{
double ratio;
Expand Down Expand Up @@ -691,6 +693,15 @@ void retro_set_environment(retro_environment_t cb)
libretro_print = log.log;

set_environment_info(cb);

struct retro_vfs_interface_info vfs_iface_info;
vfs_iface_info.required_interface_version = 3;
vfs_iface_info.iface = nullptr;
if (environ_cb(RETRO_ENVIRONMENT_GET_VFS_INTERFACE, &vfs_iface_info) && vfs_iface_info.iface)
libretro_vfs_interface = vfs_iface_info.iface;
else
libretro_vfs_interface = nullptr;

}

void retro_set_video_refresh(retro_video_refresh_t cb)
Expand Down
Loading
Loading