Skip to content

Commit a9809e4

Browse files
committed
rg_system: Replaced RG_BUILD_TYPE with RG_BUILD_RELEASE
Release or not is all we care about. Any more nuance is controlled by other flags.
1 parent 2e3ff40 commit a9809e4

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

components/retro-go/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ if(RG_BUILD_VERSION)
4646
component_compile_options(-DRG_BUILD_VERSION="${RG_BUILD_VERSION}")
4747
endif()
4848

49-
if(RG_BUILD_TYPE)
50-
component_compile_options(-DRG_BUILD_TYPE=${RG_BUILD_TYPE})
49+
if(RG_BUILD_RELEASE)
50+
component_compile_options(-DRG_BUILD_RELEASE=1)
5151
endif()
5252

5353
set(RG_TARGET "RG_TARGET_${RG_BUILD_TARGET}")

components/retro-go/rg_system.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ rg_app_t *rg_system_init(int sampleRate, const rg_handlers_t *handlers, const rg
328328
.tickTimeout = 3000000,
329329
.watchdog = true,
330330
.lowMemoryMode = false,
331-
#if RG_BUILD_TYPE == 1
331+
#if RG_BUILD_RELEASE
332332
.isRelease = true,
333333
.logLevel = RG_LOG_INFO,
334334
#else

components/retro-go/rg_system.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -288,11 +288,12 @@ float rg_emu_get_speed(void);
288288
#define RG_LOGE(x, ...) rg_system_log(RG_LOG_ERROR, RG_LOG_TAG, x, ## __VA_ARGS__)
289289
#define RG_LOGW(x, ...) rg_system_log(RG_LOG_WARN, RG_LOG_TAG, x, ## __VA_ARGS__)
290290
#define RG_LOGI(x, ...) rg_system_log(RG_LOG_INFO, RG_LOG_TAG, x, ## __VA_ARGS__)
291+
#if RG_BUILD_RELEASE
292+
#define RG_LOGD(x, ...)
293+
#define RG_LOGV(x, ...)
294+
#else
291295
#define RG_LOGD(x, ...) rg_system_log(RG_LOG_DEBUG, RG_LOG_TAG, x, ## __VA_ARGS__)
292-
#if RG_BUILD_TYPE != 1
293296
#define RG_LOGV(x, ...) rg_system_log(RG_LOG_VERBOSE, RG_LOG_TAG, x, ## __VA_ARGS__)
294-
#else
295-
#define RG_LOGV(x, ...)
296297
#endif
297298

298299
#ifdef RG_ENABLE_PROFILING

rg_tool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ def build_app(app, device_type, with_profiling=False, no_networking=False, is_re
205205
args = ["idf.py", "app"]
206206
args.append(f"-DRG_BUILD_VERSION={PROJECT_VER}")
207207
args.append(f"-DRG_BUILD_TARGET={re.sub(r'[^A-Z0-9]', '_', device_type.upper())}")
208-
args.append(f"-DRG_BUILD_TYPE={1 if is_release else 0}")
208+
args.append(f"-DRG_BUILD_RELEASE={1 if is_release else 0}")
209209
args.append(f"-DRG_ENABLE_PROFILING={1 if with_profiling else 0}")
210210
args.append(f"-DRG_ENABLE_NETWORKING={0 if no_networking else 1}")
211211
run(args, cwd=os.path.join(os.getcwd(), app))

0 commit comments

Comments
 (0)