comparison Source/Mappings/Control/TouchkeyControlMappingShortEditor.cpp @ 20:dfff66c07936

Lots of minor changes to support building on Visual Studio. A few MSVC-specific #ifdefs to eliminate things Visual Studio doesn't like. This version now compiles on Windows (provided liblo, Juce and pthread are present) but the TouchKeys device support is not yet enabled. Also, the code now needs to be re-checked on Mac and Linux.
author Andrew McPherson <andrewm@eecs.qmul.ac.uk>
date Sun, 09 Feb 2014 18:40:51 +0000
parents 3580ffe87dc8
children 5f25a9b0139e
comparison
equal deleted inserted replaced
19:5d91c6f5aa90 20:dfff66c07936
249 { 249 {
250 // Update the editors to reflect the current status 250 // Update the editors to reflect the current status
251 if(!inputRangeLowEditor->hasKeyboardFocus(true)) { 251 if(!inputRangeLowEditor->hasKeyboardFocus(true)) {
252 float value = factory_.getRangeInputMin(); 252 float value = factory_.getRangeInputMin();
253 char st[16]; 253 char st[16];
254 #ifdef _MSC_VER
255 _snprintf_s(st, 16, _TRUNCATE, "%.2f", value);
256 #else
254 snprintf(st, 16, "%.2f", value); 257 snprintf(st, 16, "%.2f", value);
255 258 #endif
256 inputRangeLowEditor->setText(st); 259 inputRangeLowEditor->setText(st);
257 } 260 }
258 261
259 if(!inputRangeHighEditor->hasKeyboardFocus(true)) { 262 if(!inputRangeHighEditor->hasKeyboardFocus(true)) {
260 float value = factory_.getRangeInputMax(); 263 float value = factory_.getRangeInputMax();
261 char st[16]; 264 char st[16];
265 #ifdef _MSC_VER
266 _snprintf_s(st, 16, _TRUNCATE, "%.2f", value);
267 #else
262 snprintf(st, 16, "%.2f", value); 268 snprintf(st, 16, "%.2f", value);
269 #endif
263 270
264 inputRangeHighEditor->setText(st); 271 inputRangeHighEditor->setText(st);
265 } 272 }
266 273
267 parameterComboBox->setSelectedId(factory_.getInputParameter(), dontSendNotification); 274 parameterComboBox->setSelectedId(factory_.getInputParameter(), dontSendNotification);