From ee6df1ba773c5da0021592e390d07ace1ab414f1 Mon Sep 17 00:00:00 2001 From: tracer-ics2023 Date: Wed, 25 Sep 2024 21:58:23 +0800 Subject: [PATCH] =?UTF-8?q?>=20=20compile=20NEMU=20221220000=20=E5=BC=A0?= =?UTF-8?q?=E4=B8=89=20Linux=20zzy=205.15.146.1-microsoft-standard-WSL2=20?= =?UTF-8?q?#1=20SMP=20Thu=20Jan=2011=2004:09:03=20UTC=202024=20x86=5F64=20?= =?UTF-8?q?x86=5F64=20x86=5F64=20GNU/Linux=20=2021:58:23=20up=207=20days,?= =?UTF-8?q?=2021:58,=20=201=20user,=20=20load=20average:=200.18,=200.27,?= =?UTF-8?q?=200.24?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- navy-apps/apps/nslider/src/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/navy-apps/apps/nslider/src/main.cpp b/navy-apps/apps/nslider/src/main.cpp index 2fd658b..4ceb869 100644 --- a/navy-apps/apps/nslider/src/main.cpp +++ b/navy-apps/apps/nslider/src/main.cpp @@ -28,7 +28,9 @@ void render() { char fname[256]; sprintf(fname, path, cur); // slide = SDL_LoadBMP(fname); - uint32_t* slide = (uint32_t*)BMP_Load(fname, NULL, NULL); + int w, h; + uint32_t* slide = (uint32_t*)BMP_Load(fname, &w, &h); + NDL_OpenCanvas(&w, &h); assert(slide); // SDL_UpdateRect(slide, 0, 0, 0, 0); NDL_DrawRect(slide, 0, 0, W, H);