Commit MetaInfo

Revision7a704cf1257ebb6774d71985e4671d55af91695c (tree)
Time2019-06-17 01:39:16
AuthorSHIRAKATA Kentaro <argrath@ub32...>
CommiterSHIRAKATA Kentaro

Log Message

patch for win32/gui

Change Summary

Incremental Difference

--- a/win/win32/mhstatus.c
+++ b/win/win32/mhstatus.c
@@ -348,9 +348,13 @@ onWMPaint(HWND hWnd, WPARAM wParam, LPARAM lParam)
348348
349349 cached_font * fnt = mswin_get_font(NHW_STATUS, fntatr, hdc, FALSE);
350350
351+#if 0 /*JP*/
351352 BOOL useUnicode = fnt->supportsUnicode;
353+#endif
352354
355+#if 0 /*JP*//* wcharに変換しない */
353356 winos_ascii_to_wide_str(str, wbuf, SIZE(wbuf));
357+#endif
354358
355359 nFg = (clr == NO_COLOR ? status_fg_color
356360 : ((clr >= 0 && clr < CLR_MAX) ? nhcolor_to_RGB(clr)
@@ -406,10 +410,10 @@ onWMPaint(HWND hWnd, WPARAM wParam, LPARAM lParam)
406410 }
407411 #else
408412 /* get bounding rectangle */
409- GetTextExtentPoint32(hdc, wbuf, vlen, &sz);
413+ GetTextExtentPoint32(hdc, str, vlen, &sz);
410414
411415 /* first draw title normally */
412- DrawText(hdc, wbuf, vlen, &rt, DT_LEFT);
416+ DrawText(hdc, str, vlen, &rt, DT_LEFT);
413417 #endif
414418 int bar_percent = status_string->bar_percent;
415419 if (bar_percent > 0) {
@@ -433,7 +437,7 @@ onWMPaint(HWND hWnd, WPARAM wParam, LPARAM lParam)
433437 else
434438 DrawTextA(hdc, str, vlen, &barrect, DT_LEFT);
435439 #else
436- DrawText(hdc, wbuf, vlen, &barrect, DT_LEFT);
440+ DrawText(hdc, str, vlen, &barrect, DT_LEFT);
437441 #endif
438442 }
439443 DeleteObject(back_brush);
@@ -468,10 +472,10 @@ onWMPaint(HWND hWnd, WPARAM wParam, LPARAM lParam)
468472 }
469473 #else
470474 /* get bounding rectangle */
471- GetTextExtentPoint32(hdc, wbuf, vlen, &sz);
475+ GetTextExtentPoint32(hdc, str, vlen, &sz);
472476
473477 /* draw */
474- DrawText(hdc, wbuf, vlen, &rt, DT_LEFT);
478+ DrawText(hdc, str, vlen, &rt, DT_LEFT);
475479 #endif
476480 }
477481 assert(sz.cy >= 0);
Show on old repository browser