blob: 9776f9f682bcee02ff1a82a8c05cee1c7f57aadd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#include "TZR_render.h"
#include "TZR_globals.h"
#include "sdl_error.h"
#include <SDL2/SDL_render.h>
int
TZR_DrawBegin(void)
{
if (TZR_BlendMode(SDL_BLENDMODE_BLEND))
return sdl_error(-1);
if (___tzr_config.hd_render)
return 0;
if (___tzr_config.interlace) {
SDL_Texture *const tmp = ___tzr_target;
___tzr_target = ___tzr_target_pre;
___tzr_target_pre = tmp;
}
if (SDL_SetRenderTarget(___tzr_renderer, ___tzr_target) < 0)
return sdl_error(-1);
return 0;
}
|