From 676390c58c6367bcfeda901456d637939645b78e Mon Sep 17 00:00:00 2001 From: Takamichi Horikawa Date: Tue, 12 Sep 2017 21:23:09 +0900 Subject: pacc: d3d9: fix unicode function --- pacc/pacc-d3d9.c | 3 +-- pacc/pacc-gl.c | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pacc/pacc-d3d9.c b/pacc/pacc-d3d9.c index 21f3210..5189afd 100644 --- a/pacc/pacc-d3d9.c +++ b/pacc/pacc-d3d9.c @@ -90,7 +90,6 @@ static struct pacc_buf *pacc_gen_buf( if (res != D3D_OK) goto err; return pb; err: - MessageBox(pc->hwnd, L"Hello", L"HI", 0); pacc_buf_delete(pb); return 0; } @@ -479,7 +478,7 @@ struct pacc_ctx *pacc_init_d3d9( atomic_init(&pc->killthread, false); pc->rendermtx = CreateMutex(0, FALSE, 0); if (!pc->rendermtx) goto err; - pc->d3d9m = LoadLibrary(L"d3d9"); + pc->d3d9m = LoadLibraryW(L"d3d9"); if (!pc->d3d9m) goto err; IDirect3D9 * WINAPI (*d3d9create)(UINT) = (IDirect3D9 * WINAPI (*)(UINT))GetProcAddress(pc->d3d9m, "Direct3DCreate9"); if (!d3d9create) goto err; diff --git a/pacc/pacc-gl.c b/pacc/pacc-gl.c index 71435de..e1463b8 100644 --- a/pacc/pacc-gl.c +++ b/pacc/pacc-gl.c @@ -246,6 +246,7 @@ static void pacc_calc_off( static void pacc_buf_rect_off( const struct pacc_ctx *pc, struct pacc_buf *pb, int x, int y, int w, int h, int xoff, int yoff) { + if (!w && !h) return; float scale[2]; float off[2]; float tscale[2]; -- cgit v1.2.3