Create minmax.h for libchdr

This commit is contained in:
twinaphex 2017-09-21 19:28:10 +02:00
parent cff35f3611
commit c3b5981dc0
3 changed files with 23 additions and 5 deletions

View File

@ -49,13 +49,11 @@
#include "LzmaEnc.h"
#include "LzmaDec.h"
#include "retro_inline.h"
#include "minmax.h"
#define TRUE 1
#define FALSE 0
#define MAX(x, y) (((x) > (y)) ? (x) : (y))
#define MIN(x, y) (((x) < (y)) ? (x) : (y))
#define CHD_MAKE_TAG(a,b,c,d) (((a) << 24) | ((b) << 16) | ((c) << 8) | (d))
/***************************************************************************

View File

@ -12,6 +12,7 @@
#include <assert.h>
#include <string.h>
#include "flac.h"
#include "minmax.h"
/***************************************************************************
* FLAC DECODER
@ -206,8 +207,6 @@ uint32_t flac_decoder_finish(flac_decoder* decoder)
*-------------------------------------------------
*/
#define MIN(x, y) ((x) < (y) ? (x) : (y))
FLAC__StreamDecoderReadStatus flac_decoder_read_callback_static(const FLAC__StreamDecoder *decoder, FLAC__byte buffer[], size_t *bytes, void *client_data)
{
return flac_decoder_read_callback(client_data, buffer, bytes);

View File

@ -0,0 +1,21 @@
/* license:BSD-3-Clause
* copyright-holders:Aaron Giles
***************************************************************************
minmax.h
***************************************************************************/
#pragma once
#ifndef __MINMAX_H__
#define __MINMAX_H__
#if defined(RARCH_INTERNAL) || defined(__LIBRETRO__)
#include <retro_miscellaneous.h>
#else
#define MAX(x, y) (((x) > (y)) ? (x) : (y))
#define MIN(x, y) ((x) < (y) ? (x) : (y))
#endif
#endif