Merge pull request #49653 from madmiraal/remove-err_prints-3.x
[3.x] Remove duplicate ERR_PRINTS macro
This commit is contained in:
@ -221,7 +221,7 @@ void AudioDriverALSA::thread_func(void *p_udata) {
|
||||
} else {
|
||||
wrote = snd_pcm_recover(ad->pcm_handle, wrote, 0);
|
||||
if (wrote < 0) {
|
||||
ERR_PRINTS("ALSA: Failed and can't recover: " + String(snd_strerror(wrote)));
|
||||
ERR_PRINT("ALSA: Failed and can't recover: " + String(snd_strerror(wrote)));
|
||||
ad->active = false;
|
||||
ad->exit_thread = true;
|
||||
}
|
||||
|
||||
@ -91,7 +91,7 @@ void MIDIDriverALSAMidi::thread_func(void *p_udata) {
|
||||
ret = snd_rawmidi_read(midi_in, &byte, 1);
|
||||
if (ret < 0) {
|
||||
if (ret != -EAGAIN) {
|
||||
ERR_PRINTS("snd_rawmidi_read error: " + String(snd_strerror(ret)));
|
||||
ERR_PRINT("snd_rawmidi_read error: " + String(snd_strerror(ret)));
|
||||
}
|
||||
} else {
|
||||
if (byte & 0x80) {
|
||||
|
||||
@ -234,7 +234,7 @@ OSStatus AudioDriverCoreAudio::input_callback(void *inRefCon,
|
||||
}
|
||||
}
|
||||
} else {
|
||||
ERR_PRINTS("AudioUnitRender failed, code: " + itos(result));
|
||||
ERR_PRINT("AudioUnitRender failed, code: " + itos(result));
|
||||
}
|
||||
|
||||
ad->unlock();
|
||||
@ -246,7 +246,7 @@ void AudioDriverCoreAudio::start() {
|
||||
if (!active) {
|
||||
OSStatus result = AudioOutputUnitStart(audio_unit);
|
||||
if (result != noErr) {
|
||||
ERR_PRINTS("AudioOutputUnitStart failed, code: " + itos(result));
|
||||
ERR_PRINT("AudioOutputUnitStart failed, code: " + itos(result));
|
||||
} else {
|
||||
active = true;
|
||||
}
|
||||
@ -257,7 +257,7 @@ void AudioDriverCoreAudio::stop() {
|
||||
if (active) {
|
||||
OSStatus result = AudioOutputUnitStop(audio_unit);
|
||||
if (result != noErr) {
|
||||
ERR_PRINTS("AudioOutputUnitStop failed, code: " + itos(result));
|
||||
ERR_PRINT("AudioOutputUnitStop failed, code: " + itos(result));
|
||||
} else {
|
||||
active = false;
|
||||
}
|
||||
@ -474,7 +474,7 @@ Error AudioDriverCoreAudio::capture_start() {
|
||||
|
||||
OSStatus result = AudioOutputUnitStart(input_unit);
|
||||
if (result != noErr) {
|
||||
ERR_PRINTS("AudioOutputUnitStart failed, code: " + itos(result));
|
||||
ERR_PRINT("AudioOutputUnitStart failed, code: " + itos(result));
|
||||
}
|
||||
|
||||
return OK;
|
||||
@ -484,7 +484,7 @@ Error AudioDriverCoreAudio::capture_stop() {
|
||||
if (input_unit) {
|
||||
OSStatus result = AudioOutputUnitStop(input_unit);
|
||||
if (result != noErr) {
|
||||
ERR_PRINTS("AudioOutputUnitStop failed, code: " + itos(result));
|
||||
ERR_PRINT("AudioOutputUnitStop failed, code: " + itos(result));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -50,13 +50,13 @@ Error MIDIDriverCoreMidi::open() {
|
||||
OSStatus result = MIDIClientCreate(name, NULL, NULL, &client);
|
||||
CFRelease(name);
|
||||
if (result != noErr) {
|
||||
ERR_PRINTS("MIDIClientCreate failed, code: " + itos(result));
|
||||
ERR_PRINT("MIDIClientCreate failed, code: " + itos(result));
|
||||
return ERR_CANT_OPEN;
|
||||
}
|
||||
|
||||
result = MIDIInputPortCreate(client, CFSTR("Godot Input"), MIDIDriverCoreMidi::read, (void *)this, &port_in);
|
||||
if (result != noErr) {
|
||||
ERR_PRINTS("MIDIInputPortCreate failed, code: " + itos(result));
|
||||
ERR_PRINT("MIDIInputPortCreate failed, code: " + itos(result));
|
||||
return ERR_CANT_OPEN;
|
||||
}
|
||||
|
||||
|
||||
@ -134,7 +134,7 @@ static void GLAPIENTRY _gl_debug_print(GLenum source, GLenum type, GLuint id, GL
|
||||
|
||||
String output = String() + "GL ERROR: Source: " + debSource + "\tType: " + debType + "\tID: " + itos(id) + "\tSeverity: " + debSev + "\tMessage: " + message;
|
||||
|
||||
ERR_PRINTS(output);
|
||||
ERR_PRINT(output);
|
||||
}
|
||||
#endif // CAN_DEBUG
|
||||
|
||||
|
||||
@ -641,7 +641,7 @@ void RasterizerStorageGLES2::texture_set_data(RID p_texture, const Ref<Image> &p
|
||||
|
||||
if (texture->resize_to_po2) {
|
||||
if (p_image->is_compressed()) {
|
||||
ERR_PRINTS("Texture '" + texture->path + "' is required to be a power of 2 because it uses either mipmaps or repeat, so it was decompressed. This will hurt performance and memory usage.");
|
||||
ERR_PRINT("Texture '" + texture->path + "' is required to be a power of 2 because it uses either mipmaps or repeat, so it was decompressed. This will hurt performance and memory usage.");
|
||||
}
|
||||
|
||||
if (img == p_image) {
|
||||
|
||||
@ -123,7 +123,7 @@ static void _display_error_with_code(const String &p_error, const Vector<const c
|
||||
line++;
|
||||
}
|
||||
|
||||
ERR_PRINTS(p_error);
|
||||
ERR_PRINT(p_error);
|
||||
}
|
||||
|
||||
static String _mkid(const String &p_id) {
|
||||
|
||||
@ -121,7 +121,7 @@ static void GLAPIENTRY _gl_debug_print(GLenum source, GLenum type, GLuint id, GL
|
||||
|
||||
String output = String() + "GL ERROR: Source: " + debSource + "\tType: " + debType + "\tID: " + itos(id) + "\tSeverity: " + debSev + "\tMessage: " + message;
|
||||
|
||||
ERR_PRINTS(output);
|
||||
ERR_PRINT(output);
|
||||
}
|
||||
#endif // GLAD_ENABLED
|
||||
|
||||
|
||||
@ -153,7 +153,7 @@ static void _display_error_with_code(const String &p_error, const Vector<const c
|
||||
line++;
|
||||
}
|
||||
|
||||
ERR_PRINTS(p_error);
|
||||
ERR_PRINT(p_error);
|
||||
}
|
||||
|
||||
ShaderGLES3::Version *ShaderGLES3::get_current_version() {
|
||||
|
||||
@ -239,7 +239,7 @@ Error AudioDriverPulseAudio::init_device() {
|
||||
|
||||
pa_str = pa_stream_new(pa_ctx, "Sound", &spec, &pa_map);
|
||||
if (pa_str == nullptr) {
|
||||
ERR_PRINTS("PulseAudio: pa_stream_new error: " + String(pa_strerror(pa_context_errno(pa_ctx))));
|
||||
ERR_PRINT("PulseAudio: pa_stream_new error: " + String(pa_strerror(pa_context_errno(pa_ctx))));
|
||||
ERR_FAIL_V(ERR_CANT_OPEN);
|
||||
}
|
||||
|
||||
@ -429,7 +429,7 @@ void AudioDriverPulseAudio::thread_func(void *p_udata) {
|
||||
const void *ptr = ad->samples_out.ptr();
|
||||
ret = pa_stream_write(ad->pa_str, (char *)ptr + write_ofs, bytes_to_write, nullptr, 0LL, PA_SEEK_RELATIVE);
|
||||
if (ret != 0) {
|
||||
ERR_PRINTS("PulseAudio: pa_stream_write error: " + String(pa_strerror(ret)));
|
||||
ERR_PRINT("PulseAudio: pa_stream_write error: " + String(pa_strerror(ret)));
|
||||
} else {
|
||||
avail_bytes -= bytes_to_write;
|
||||
write_ofs += bytes_to_write;
|
||||
@ -704,7 +704,7 @@ Error AudioDriverPulseAudio::capture_init_device() {
|
||||
|
||||
pa_rec_str = pa_stream_new(pa_ctx, "Record", &spec, &pa_rec_map);
|
||||
if (pa_rec_str == nullptr) {
|
||||
ERR_PRINTS("PulseAudio: pa_stream_new error: " + String(pa_strerror(pa_context_errno(pa_ctx))));
|
||||
ERR_PRINT("PulseAudio: pa_stream_new error: " + String(pa_strerror(pa_context_errno(pa_ctx))));
|
||||
ERR_FAIL_V(ERR_CANT_OPEN);
|
||||
}
|
||||
|
||||
@ -712,7 +712,7 @@ Error AudioDriverPulseAudio::capture_init_device() {
|
||||
pa_stream_flags flags = pa_stream_flags(PA_STREAM_INTERPOLATE_TIMING | PA_STREAM_ADJUST_LATENCY | PA_STREAM_AUTO_TIMING_UPDATE);
|
||||
int error_code = pa_stream_connect_record(pa_rec_str, dev, &attr, flags);
|
||||
if (error_code < 0) {
|
||||
ERR_PRINTS("PulseAudio: pa_stream_connect_record error: " + String(pa_strerror(error_code)));
|
||||
ERR_PRINT("PulseAudio: pa_stream_connect_record error: " + String(pa_strerror(error_code)));
|
||||
ERR_FAIL_V(ERR_CANT_OPEN);
|
||||
}
|
||||
|
||||
@ -728,7 +728,7 @@ void AudioDriverPulseAudio::capture_finish_device() {
|
||||
if (pa_rec_str) {
|
||||
int ret = pa_stream_disconnect(pa_rec_str);
|
||||
if (ret != 0) {
|
||||
ERR_PRINTS("PulseAudio: pa_stream_disconnect error: " + String(pa_strerror(ret)));
|
||||
ERR_PRINT("PulseAudio: pa_stream_disconnect error: " + String(pa_strerror(ret)));
|
||||
}
|
||||
pa_stream_unref(pa_rec_str);
|
||||
pa_rec_str = nullptr;
|
||||
|
||||
@ -51,12 +51,12 @@ Error MIDIDriverWinMidi::open() {
|
||||
} else {
|
||||
char err[256];
|
||||
midiInGetErrorText(res, err, 256);
|
||||
ERR_PRINTS("midiInOpen error: " + String(err));
|
||||
ERR_PRINT("midiInOpen error: " + String(err));
|
||||
|
||||
MIDIINCAPS caps;
|
||||
res = midiInGetDevCaps(i, &caps, sizeof(MIDIINCAPS));
|
||||
if (res == MMSYSERR_NOERROR) {
|
||||
ERR_PRINTS("Can't open MIDI device \"" + String(caps.szPname) + "\", is it being used by another application?");
|
||||
ERR_PRINT("Can't open MIDI device \"" + String(caps.szPname) + "\", is it being used by another application?");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user