mirror of
https://github.com/libretro/retroluxury.git
synced 2024-11-23 07:39:47 +00:00
added the desired aspect to rl_backgrnd_create
This commit is contained in:
parent
16db263a3d
commit
a4c039a40a
@ -7,17 +7,20 @@ static uint16_t* pixels;
|
||||
static int width, height;
|
||||
static uint16_t* fb;
|
||||
|
||||
int rl_backgrnd_create( int w, int h )
|
||||
int rl_backgrnd_create( int w, int h, int aspect )
|
||||
{
|
||||
pixels = (uint16_t*)rl_malloc( ( ( w + RL_BACKGRND_MARGIN ) * h + RL_BACKGRND_MARGIN ) * sizeof( uint16_t ) );
|
||||
|
||||
if ( pixels )
|
||||
if ( aspect == RL_BACKGRND_EXACT )
|
||||
{
|
||||
width = w;
|
||||
height = h;
|
||||
fb = (uint16_t*)pixels + RL_BACKGRND_MARGIN;
|
||||
pixels = (uint16_t*)rl_malloc( ( ( w + RL_BACKGRND_MARGIN ) * h + RL_BACKGRND_MARGIN ) * sizeof( uint16_t ) );
|
||||
|
||||
return 0;
|
||||
if ( pixels )
|
||||
{
|
||||
width = w;
|
||||
height = h;
|
||||
fb = (uint16_t*)pixels + RL_BACKGRND_MARGIN;
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
|
@ -3,7 +3,11 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
int rl_backgrnd_create( int width, int height );
|
||||
#define RL_BACKGRND_EXACT 0
|
||||
//#define RL_BACKGRND_STRETCH 1
|
||||
//#define RL_BACKGRND_EXPAND 2
|
||||
|
||||
int rl_backgrnd_create( int width, int height, int aspect );
|
||||
void rl_backgrnd_destroy( void );
|
||||
|
||||
void rl_backgrnd_clear( uint16_t color );
|
||||
|
Loading…
Reference in New Issue
Block a user