From f033a507d3533c2c9b5c3d372f52abe2bbe4380f Mon Sep 17 00:00:00 2001 From: kichikuou Date: Sun, 20 Sep 2026 12:23:02 +0900 Subject: [PATCH] ZZ2: Return platform name from SDL Fixes #82. --- src/cmdz.c | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/src/cmdz.c b/src/cmdz.c index 670647d..3469062 100644 --- a/src/cmdz.c +++ b/src/cmdz.c @@ -376,24 +376,8 @@ void commandZZ1() { void commandZZ2() { /* 機種文字列を文字列領域 num に返す(MAX12文字)*/ int num = getCaliValue(); -#if defined(linux) - static uint8_t str[] = {0x82, 0x6B, 0x82, 0x89, 0x82, 0x8E, 0x82, 0x95, 0x82, 0x98, 0}; -#elif defined(__FreeBSD__) - static uint8_t str[] = {0x82, 0x65, 0x82, 0x92, 0x82, 0x85, 0x82, 0x85, 0x82, 0x61, 0x82, 0x72, 0x82, 0x63, 0}; -#elif defined(__OpenBSD__) - static uint8_t str[] = {0x82, 0x6E, 0x82, 0x90, 0x82, 0x85, 0x82, 0x8E, 0x82, 0x61, 0x82, 0x72, 0x82, 0x63, 0}; -#elif defined(__NetBSD__) - static uint8_t str[] = {0x82, 0x6D, 0x82, 0x85, 0x82, 0x94, 0x82, 0x61, 0x82, 0x72, 0x82, 0x63, 0}; -#elif defined(sun) - static uint8_t str[] = {0x82, 0x72, 0x82, 0x95, 0x82, 0x8E, 0x82, 0x6E, 0x82, 0x72, 0}; -#elif defined(__osf__) - static uint8_t str[] = {0x82, 0x63, 0x82, 0x89, 0x82, 0x87, 0x82, 0x89, 0x82, 0x94, 0x82, 0x81, 0x82, 0x8C, 0x82, 0x74, 0x82, 0x6D, 0x82, 0x68, 0x82, 0x77, 0}; -#elif defined(sgi) - static uint8_t str[] = {0x82, 0x68, 0x82, 0x71, 0x82, 0x68, 0x82, 0x77, 0}; -#else - static uint8_t str[] = {0x82, 0x74, 0x82, 0x8e, 0x82, 0x8b, 0x82, 0x8e, 0x82, 0x8f, 0x82, 0x97, 0x82, 0x8e, 0}; -#endif - svar_set(num, str); + + svar_set(num, SDL_GetPlatform()); TRACE("ZZ2 %d:",num); }