@@ -352,9 +352,6 @@ fun inputTextFilterCharacter(char: KMutableProperty0<Char>, flags: InputTextFlag
352352 /* Filter private Unicode range. I don't imagine anybody would want to input them. GLFW on OSX seems to send
353353 private characters for special keys like arrow keys. */
354354 if (c >= 0xE000 && c <= 0xF8FF ) return false
355-
356- println (char())
357-
358355 if (flags has (Itf .CharsDecimal or Itf .CharsHexadecimal or Itf .CharsUppercase or Itf .CharsNoBlank or Itf .CharsScientific )) {
359356
360357 if (flags has Itf .CharsDecimal )
@@ -431,8 +428,8 @@ fun inputTextCalcTextSizeW(text: CharArray, textBegin: Int, textEnd: Int, remain
431428 continue
432429 }
433430 if (c == ' \r ' ) continue
434-
435- val charWidth: Float = font.getCharAdvance_s (c) * scale
431+ // renaming ::getCharAdvance continuously every build because of bug, https://youtrack.jetbrains.com/issue/KT-19612
432+ val charWidth: Float = font.getCharAdvance_ssaaaaaaa (c) * scale
436433 lineWidth + = charWidth
437434 }
438435
@@ -466,8 +463,8 @@ fun inputTextCalcTextSizeW(text: CharArray, textBegin: Int, textEnd: Int, remain
466463fun KMutableProperty0<Number>.format (dataType : DataType , displayFormat : String , buf : CharArray ): CharArray {
467464 val value: Number = when (dataType) {
468465 DataType .Int -> this ()
469- DataType .Float -> Float .fromBits( this () as Int )
470- DataType .Double -> Double .fromBits( this () as Long )
466+ DataType .Float -> this () as Float
467+ DataType .Double -> this () as Double
471468 else -> throw Error ()
472469 }
473470 return displayFormat.format(style.locale, value).toCharArray(buf)
@@ -589,7 +586,7 @@ fun dataTypeApplyOpFromText(buf: CharArray, initialValueBuf: CharArray, dataType
589586 DataType .Float -> {
590587 // For floats we have to ignore format with precision (e.g. "%.2f") because sscanf doesn't take them in TODO not true in java
591588// val scalarFormat = scalarFormat ?: "%f"
592- var v = glm.intBitsToFloat( data() as Int )
589+ var v = data() as Float
593590 val oldV = v
594591 var a = 0f
595592 try {
@@ -612,13 +609,13 @@ fun dataTypeApplyOpFromText(buf: CharArray, initialValueBuf: CharArray, dataType
612609 }
613610 else -> a // Assign constant
614611 }
615- data.set(glm.floatBitsToInt(v) )
612+ data.set(v )
616613 oldV != v
617614 }
618615 DataType .Double -> {
619616 // For floats we have to ignore format with precision (e.g. "%.2f") because sscanf doesn't take them in TODO not true in java
620617// val scalarFormat = scalarFormat ?: "%f"
621- var v = Double .fromBits( data() as Long )
618+ var v = data() as Double
622619 val oldV = v
623620 var a = 0.0
624621 try {
@@ -641,7 +638,7 @@ fun dataTypeApplyOpFromText(buf: CharArray, initialValueBuf: CharArray, dataType
641638 }
642639 else -> a // Assign constant
643640 }
644- data.set(glm.doubleBitsToLong(v) )
641+ data.set(v )
645642 oldV != v
646643 }
647644 else -> false
0 commit comments