vdisp/gl: gamma ramp print simplified

Do not use ostringstream, print directly to logger - this will change
the output a bit, namely MOD_NAME (+ timestamp) will be prepended on
every line but it perhaps doesn't matter much.
This commit is contained in:
Martin Pulec
2026-01-06 16:41:45 +01:00
parent 44f410daf5
commit c99f0ad5bd

View File

@@ -106,7 +106,6 @@ using std::lock_guard;
using std::map;
using std::min;
using std::mutex;
using std::ostringstream;
using std::queue;
using std::stof;
using std::stoi;
@@ -1767,15 +1766,11 @@ static void print_gamma_ramp(GLFWmonitor *monitor) {
LOG(LOG_LEVEL_ERROR) << MOD_NAME << "Cannot get gamma ramp!\n";
return;
}
ostringstream oss;
oss << "Gamma ramp:\n";
MSG(VERBOSE, "Gamma ramp:\n");
for (unsigned int i = 0; i < ramp->size; ++i) {
oss << "r[" << i << "]=" << ramp->red[i] <<
", g[" << i << "]=" << ramp->green[i] <<
", b[" << i << "]=" << ramp->blue[i] << "\n";
MSG(VERBOSE, "r[%u]=%hd, g[%u]=%hd, b[%u]=%hd\n", i,
ramp->red[i], i, ramp->green[i], i, ramp->blue[i]);
}
LOG(LOG_LEVEL_VERBOSE) << MOD_NAME << oss.str();
}
static void set_gamma(struct state_gl *s) {