diff options
| author | Lioncash <mathew1800@gmail.com> | 2014-03-12 15:33:41 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2014-03-14 13:51:23 -0400 |
| commit | a82675b7d581421fa80d5d5c53253cf1d5c1a26d (patch) | |
| tree | 8f1efce1e00c6a7d6044ca3b543d9211a65e8c11 /Source/Core/DolphinWX/InputConfigDiagBitmaps.cpp | |
| parent | dccc6d8b47b1f6fdab5374003492560c20f766b6 (diff) | |
Kill off some usages of c_str.
Also changes some function params, but this is ok.
Some simplifications were also able to be made (ie. killing off strcmps with ==, etc).
Diffstat (limited to 'Source/Core/DolphinWX/InputConfigDiagBitmaps.cpp')
| -rw-r--r-- | Source/Core/DolphinWX/InputConfigDiagBitmaps.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/Core/DolphinWX/InputConfigDiagBitmaps.cpp b/Source/Core/DolphinWX/InputConfigDiagBitmaps.cpp index 5ade4c711b..e1bc6bd3f2 100644 --- a/Source/Core/DolphinWX/InputConfigDiagBitmaps.cpp +++ b/Source/Core/DolphinWX/InputConfigDiagBitmaps.cpp @@ -128,12 +128,12 @@ void InputConfigDialog::UpdateBitmaps(wxTimerEvent& WXUNUSED(event)) , d_of = box / 256.0 , x_of = box / 2.0; - if (strcmp(g->control_group->name, "Main Stick") == 0) + if (g->control_group->name == "Main Stick") { max = (87.0f / 127.0f) * 100; diagonal = (55.0f / 127.0f) * 100.0; } - else if (strcmp(g->control_group->name,"C-Stick") == 0) + else if (g->control_group->name == "C-Stick") { max = (74.0f / 127.0f) * 100; diagonal = (46.0f / 127.0f) * 100; @@ -278,7 +278,7 @@ void InputConfigDialog::UpdateBitmaps(wxTimerEvent& WXUNUSED(event)) dc.DrawRectangle(n * 12, 0, 14, 12); // text - const char* const name = g->control_group->controls[n]->name; + const std::string name = g->control_group->controls[n]->name; // bit of hax so ZL, ZR show up as L, R dc.DrawText(StrToWxStr(std::string(1, (name[1] && name[1] < 'a') ? name[1] : name[0])), n*12 + 2, 1); } |
