mirror of https://github.com/snes9xgit/snes9x.git
Merge `FORCE_INLINE` macro to `alwaysinline` into port.h.
This commit is contained in:
parent
9cec789d1b
commit
c71429c2b7
|
@ -5,17 +5,6 @@
|
|||
#include "../../resampler.h"
|
||||
#include "../../../msu1.h"
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#define inline inline
|
||||
#define alwaysinline inline __attribute__((always_inline))
|
||||
#elif defined(_MSC_VER)
|
||||
#define inline inline
|
||||
#define alwaysinline inline __forceinline
|
||||
#else
|
||||
#define inline inline
|
||||
#define alwaysinline inline
|
||||
#endif
|
||||
|
||||
#define debugvirtual
|
||||
|
||||
namespace SNES
|
||||
|
|
|
@ -74,15 +74,6 @@ uint32_t gradientARGB(uint32_t pixFront, uint32_t pixBack) //find intermediate c
|
|||
//
|
||||
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define FORCE_INLINE __forceinline
|
||||
#elif defined __GNUC__
|
||||
#define FORCE_INLINE __attribute__((always_inline)) inline
|
||||
#else
|
||||
#define FORCE_INLINE inline
|
||||
#endif
|
||||
|
||||
|
||||
enum RotationDegree //clock-wise
|
||||
{
|
||||
ROT_0,
|
||||
|
@ -268,7 +259,7 @@ input kernel area naming convention:
|
|||
-----------------
|
||||
*/
|
||||
template <class ColorDistance>
|
||||
FORCE_INLINE //detect blend direction
|
||||
alwaysinline //detect blend direction
|
||||
BlendResult preProcessCorners(const Kernel_4x4& ker, const xbrz::ScalerCfg& cfg) //result: F, G, J, K corners of "GradientType"
|
||||
{
|
||||
BlendResult result = {};
|
||||
|
@ -378,7 +369,7 @@ input kernel area naming convention:
|
|||
-------------
|
||||
*/
|
||||
template <class Scaler, class ColorDistance, RotationDegree rotDeg>
|
||||
FORCE_INLINE //perf: quite worth it!
|
||||
alwaysinline //perf: quite worth it!
|
||||
void blendPixel(const Kernel_3x3& ker,
|
||||
uint32_t* target, int trgWidth,
|
||||
unsigned char blendInfo, //result of preprocessing all four corners of pixel "e"
|
||||
|
|
8
port.h
8
port.h
|
@ -44,6 +44,14 @@
|
|||
#define PIXEL_FORMAT RGB565
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#define alwaysinline inline __attribute__((always_inline))
|
||||
#elif defined(_MSC_VER)
|
||||
#define alwaysinline __forceinline
|
||||
#else
|
||||
#define alwaysinline inline
|
||||
#endif
|
||||
|
||||
#ifndef snes9x_types_defined
|
||||
#define snes9x_types_defined
|
||||
typedef unsigned char bool8;
|
||||
|
|
Loading…
Reference in New Issue