(360) Corrections to gfx_init and fbo_init

This commit is contained in:
TwinAphex51224 2012-04-18 23:35:01 +02:00
parent 9d5da1e9e0
commit 7bab422a44
2 changed files with 8 additions and 6 deletions

View File

@ -390,11 +390,13 @@ static bool xdk360_init_fbo(xdk360_video_t * vid, unsigned width, unsigned heigh
return false;
vid->d3d_render_device->CreateTexture(width * g_settings.video.fbo_scale_x, width * g_settings.video.fbo_scale_y, 1, 0, D3DFMT_LIN_X1R5G5B5,
0, &vid->lpTexture, NULL);
0, &vid->lpTexture2, NULL);
vid->d3d_render_device->CreateRenderTarget(height * g_settings.video.fbo_scale_x, height * g_settings.video.fbo_scale_y, ( D3DFORMAT )MAKESRGBFMT( D3DFMT_A8R8G8B8 ),
D3DMULTISAMPLE_NONE, 0, 0, &vid->fbo, NULL );
xdk360_convert_texture_to_as16_srgb(vid->lpTexture2);
vid->fbo_inited = true;
return true;
@ -446,12 +448,11 @@ static void *xdk360_gfx_init(const video_info_t *video, const input_driver_t **i
hlsl_init(g_settings.video.cg_shader_path, vid->d3d_render_device);
if(!xdk360_init_fbo(vid, SSNES_SCALE_BASE * video->input_scale,
SSNES_SCALE_BASE * video->input_scale))
{
vid->d3d_render_device->CreateTexture(512, 512, 1, 0, D3DFMT_LIN_X1R5G5B5,
xdk360_init_fbo(vid, SSNES_SCALE_BASE * video->input_scale,
SSNES_SCALE_BASE * video->input_scale);
vid->d3d_render_device->CreateTexture(512, 512, 1, 0, D3DFMT_LIN_X1R5G5B5,
0, &vid->lpTexture, NULL);
}
xdk360_convert_texture_to_as16_srgb(vid->lpTexture);

View File

@ -51,6 +51,7 @@ typedef struct xdk360_video
IDirect3DDevice9* d3d_render_device;
IDirect3DVertexBuffer9* vertex_buf;
IDirect3DTexture9* lpTexture;
IDirect3DTexture9* lpTexture2;
IDirect3DVertexDeclaration9* v_decl;
LPDIRECT3DSURFACE9 fbo;
D3DPRESENT_PARAMETERS d3dpp;