mirror of
https://github.com/mauiaaron/apple2.git
synced 2024-06-01 13:41:28 +00:00
Excise RELEASE_LOG() and RELEASE_BREAK() macros
- LOG() and assert() work just fine ;)
This commit is contained in:
parent
3c1dcd4a69
commit
3b1c72e872
|
@ -146,7 +146,7 @@ void Java_org_deadc0de_apple2ix_Apple2CrashHandler_nativeProcessCrash(JNIEnv *en
|
|||
|
||||
bool success = crashHandler->processCrash(crashPath, symbolsPath, outputFILE);
|
||||
if (!success) {
|
||||
RELEASE_LOG("CRASH REPORT PROCESSING FAILED ...");
|
||||
LOG("CRASH REPORT PROCESSING FAILED ...");
|
||||
}
|
||||
} while (0);
|
||||
|
||||
|
|
|
@ -1618,7 +1618,7 @@ static bool MB_DSInit()
|
|||
LogFileOutput("MB_DSInit: (%02d) DSGetSoundBuffer(), hr=0x%08X\n", i, hr);
|
||||
#else
|
||||
if (nPhonemeByteLength > audio_getCurrentBackend()->systemSettings.monoBufferSizeSamples) {
|
||||
RELEASE_ERRLOG("!!!!!!!!!!!!!!!!!!!!! phoneme length > buffer size !!!!!!!!!!!!!!!!!!!!!");
|
||||
LOG("!!!!!!!!!!!!!!!!!!!!! phoneme length > buffer size !!!!!!!!!!!!!!!!!!!!!");
|
||||
#warning ^^^^^^^^^^ require vigilence here around this change ... we used to be able to specify the exact buffer size ...
|
||||
}
|
||||
nPhonemeByteLength = dwDSLockedBufferSize;
|
||||
|
|
|
@ -343,7 +343,7 @@ static unsigned int _submit_samples_buffer(const unsigned long num_channel_sampl
|
|||
}
|
||||
|
||||
if (system_buffer_size > maxSpeakerBytes) {
|
||||
RELEASE_LOG("AVOIDING BUFOVER...");
|
||||
LOG("AVOIDING BUFOVER...");
|
||||
system_buffer_size = maxSpeakerBytes;
|
||||
requested_buffer_size = maxSpeakerBytes;
|
||||
}
|
||||
|
|
20
src/common.h
20
src/common.h
|
@ -291,26 +291,6 @@ static const char *log_end = "\n";
|
|||
|
||||
#endif // NDEBUG
|
||||
|
||||
#define RELEASE_ERRLOG(...) \
|
||||
do { \
|
||||
GLenum _glerr = 0; \
|
||||
_LOG(__VA_ARGS__); \
|
||||
} while (0)
|
||||
|
||||
#define RELEASE_LOG(...) \
|
||||
do { \
|
||||
GLenum _glerr = safeGLGetError(); \
|
||||
errno = 0; \
|
||||
_LOG(__VA_ARGS__); \
|
||||
} while (0)
|
||||
|
||||
#define RELEASE_BREAK() \
|
||||
do { \
|
||||
/* BOOM */ \
|
||||
char *ptr = (char *)0xABADF000; \
|
||||
*ptr++ = '\0';\
|
||||
} while (1);
|
||||
|
||||
// memory management
|
||||
#include "memmngt.h"
|
||||
|
||||
|
|
|
@ -406,7 +406,7 @@ static void denibblize_track(const uint8_t * const src, int drive, uint8_t * con
|
|||
continue;
|
||||
}
|
||||
if (UNLIKELY(prologue[2] != 0xAD)) {
|
||||
RELEASE_LOG("OMG, found mid-track 0xD5 byte...");
|
||||
LOG("OMG, found mid-track 0xD5 byte...");
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -789,7 +789,7 @@ static void (*_textpage_plotter(uint32_t currswitches, uint32_t txtflags))(uint1
|
|||
plotFn = _plot_block80;
|
||||
} else {
|
||||
/* ??? */
|
||||
RELEASE_LOG("!!!!!!!!!!!! what mode is this? !!!!!!!!!!!!");
|
||||
LOG("!!!!!!!!!!!! what mode is this? !!!!!!!!!!!!");
|
||||
plotFn = _plot_block40;
|
||||
#warning FIXME TODO ... verify this lores40/lores80 mode ...
|
||||
}
|
||||
|
|
|
@ -231,7 +231,7 @@ static int disk_select(const struct dirent *e) {
|
|||
const size_t diskNameSize = MIN(PATH_MAX, strlen(disk_path)) + pathSepSize + MIN(PATH_MAX, strlen(e->d_name));
|
||||
|
||||
if (diskNameSize >= PATH_MAX) {
|
||||
RELEASE_ERRLOG("OOPS computed path size >= PATH_MAX!");
|
||||
LOG("OOPS computed path size >= PATH_MAX!");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1186,7 +1186,7 @@ bool c_debugger_should_break() {
|
|||
if (pthread_self() != cpu_thread_id) {
|
||||
// OOPS ...
|
||||
ERRLOG("should only call this from cpu thread, bailing...");
|
||||
RELEASE_BREAK();
|
||||
assert(false);
|
||||
}
|
||||
|
||||
bool break_stepping = false;
|
||||
|
|
|
@ -528,8 +528,8 @@ void timing_startCPU(void) {
|
|||
cpu_shutting_down = false;
|
||||
int err = TEMP_FAILURE_RETRY(pthread_create(&cpu_thread_id, NULL, (void *)&cpu_thread, (void *)NULL));
|
||||
if (err) {
|
||||
RELEASE_ERRLOG("pthread_create failed!");
|
||||
RELEASE_BREAK();
|
||||
ERRLOG("pthread_create failed!");
|
||||
assert(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -421,7 +421,7 @@ static inline int64_t _tap_key_at_point(float x, float y) {
|
|||
default: // ASCII
|
||||
isASCII = true;
|
||||
if (key >= 0x80) {
|
||||
RELEASE_LOG("unhandled key code...");
|
||||
LOG("unhandled key code...");
|
||||
key = 0;
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -226,7 +226,8 @@ static bool _sprout_menu(float x, float y) {
|
|||
}
|
||||
return menu.topRightShowing;
|
||||
} else {
|
||||
RELEASE_ERRLOG("This should not happen");
|
||||
LOG("This should not happen");
|
||||
assert(false);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ static void _glvideo_setup_hackarounds(void) {
|
|||
if (vendor && renderer && version) {
|
||||
LOG("GL_VENDOR:[%s] GL_RENDERER:[%s] GL_VERSION:[%s]", vendor, renderer, version);
|
||||
} else {
|
||||
RELEASE_LOG("One or more of GL_VENDOR, GL_RENDERER, and GL_VERSION is NULL ... this is bad ...");
|
||||
ERRLOG("One or more of GL_VENDOR, GL_RENDERER, and GL_VERSION is NULL ... this is bad ...");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -149,7 +149,7 @@ GLuint glshader_buildProgram(demoSource *vertexSource, demoSource *fragmentSourc
|
|||
if (version) {
|
||||
sprintf(sourceString, "#version %d\n%s", version, vertexSource->string);
|
||||
} else {
|
||||
RELEASE_LOG("No GLSL version specified ... so NOT adding a #version directive to shader sources =P");
|
||||
LOG("No GLSL version specified ... so NOT adding a #version directive to shader sources =P");
|
||||
sprintf(sourceString, "%s", vertexSource->string);
|
||||
}
|
||||
|
||||
|
|
18
src/vm.c
18
src/vm.c
|
@ -936,7 +936,7 @@ GLUE_C_READ(iie_read_slot_expansion)
|
|||
|
||||
GLUE_C_READ(debug_illegal_bcd)
|
||||
{
|
||||
RELEASE_LOG("Illegal/undefined BCD operation encountered, debug break on c_debug_illegal_bcd to debug...");
|
||||
LOG("Illegal/undefined BCD operation encountered, debug break on c_debug_illegal_bcd to debug...");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1349,7 +1349,7 @@ bool vm_saveState(StateHelper_s *helper) {
|
|||
}
|
||||
} else {
|
||||
LOG("OOPS ... language_banks[0] == %p base_d000_rd == %p", language_banks[0], base_d000_rd);
|
||||
RELEASE_BREAK();
|
||||
assert(false);
|
||||
}
|
||||
|
||||
if (base_d000_wrt == 0) {
|
||||
|
@ -1379,7 +1379,7 @@ bool vm_saveState(StateHelper_s *helper) {
|
|||
}
|
||||
} else {
|
||||
LOG("OOPS ... language_banks[0] == %p base_d000_wrt == %p", language_banks[0], base_d000_wrt);
|
||||
RELEASE_BREAK();
|
||||
assert(false);
|
||||
}
|
||||
|
||||
if (base_e000_rd == apple_ii_64k[0]) {
|
||||
|
@ -1399,7 +1399,7 @@ bool vm_saveState(StateHelper_s *helper) {
|
|||
}
|
||||
} else {
|
||||
LOG("OOPS ... language_card[0] == %p base_e000_rd == %p", language_card[0], base_e000_rd);
|
||||
RELEASE_BREAK();
|
||||
assert(false);
|
||||
}
|
||||
|
||||
if (base_e000_wrt == 0) {
|
||||
|
@ -1419,7 +1419,7 @@ bool vm_saveState(StateHelper_s *helper) {
|
|||
}
|
||||
} else {
|
||||
LOG("OOPS ... language_card[0] == %p base_e000_wrt == %p", language_card[0], base_e000_wrt);
|
||||
RELEASE_BREAK();
|
||||
assert(false);
|
||||
}
|
||||
|
||||
saved = true;
|
||||
|
@ -1545,7 +1545,7 @@ bool vm_loadState(StateHelper_s *helper) {
|
|||
break;
|
||||
default:
|
||||
LOG("Unknown state base_d000_rd %02x", state);
|
||||
RELEASE_BREAK();
|
||||
assert(false);
|
||||
break;
|
||||
}
|
||||
LOG("LOAD base_d000_rd = %d", state);
|
||||
|
@ -1571,7 +1571,7 @@ bool vm_loadState(StateHelper_s *helper) {
|
|||
break;
|
||||
default:
|
||||
LOG("Unknown state base_d000_wrt %02x", state);
|
||||
RELEASE_BREAK();
|
||||
assert(false);
|
||||
break;
|
||||
}
|
||||
LOG("LOAD base_d000_wrt = %d", state);
|
||||
|
@ -1591,7 +1591,7 @@ bool vm_loadState(StateHelper_s *helper) {
|
|||
break;
|
||||
default:
|
||||
LOG("Unknown state base_e000_rd %02x", state);
|
||||
RELEASE_BREAK();
|
||||
assert(false);
|
||||
break;
|
||||
}
|
||||
LOG("LOAD base_e000_rd = %d", state);
|
||||
|
@ -1611,7 +1611,7 @@ bool vm_loadState(StateHelper_s *helper) {
|
|||
break;
|
||||
default:
|
||||
LOG("Unknown state base_e000_wrt %02x", state);
|
||||
RELEASE_BREAK();
|
||||
assert(false);
|
||||
break;
|
||||
}
|
||||
LOG("LOAD base_e000_wrt = %d", state);
|
||||
|
|
Loading…
Reference in New Issue
Block a user