From 8028ff7f12d7c46d8684e6b0456c01753451917b Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Sat, 17 Aug 2013 13:26:19 +0200 Subject: [PATCH] Android buildfix --- UI/ControlMappingScreen.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/UI/ControlMappingScreen.cpp b/UI/ControlMappingScreen.cpp index fd853e51f..a1a14a4ed 100644 --- a/UI/ControlMappingScreen.cpp +++ b/UI/ControlMappingScreen.cpp @@ -98,12 +98,13 @@ void ControlMapper::Refresh() { LinearLayout *row = rightColumn->Add(new LinearLayout(ORIENT_HORIZONTAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT))); Choice *c = row->Add(new Choice(deviceName + "." + keyName, new LinearLayoutParams(1.0f))); - char buf[10]; - c->SetTag(itoa(i, buf, 10)); + char tagbuf[16]; + sprintf(tagbuf, "%i", i); + c->SetTag(tagbuf); c->OnClick.Handle(this, &ControlMapper::OnReplace); Choice *d = row->Add(new Choice("X")); - d->SetTag(itoa(i, buf, 10)); + d->SetTag(tagbuf); d->OnClick.Handle(this, &ControlMapper::OnDelete); row->Add(new Choice("+"))->OnClick.Handle(this, &ControlMapper::OnAdd); @@ -126,6 +127,8 @@ void ControlMapper::MappedCallback(KeyDef kdf) { case REPLACEONE: KeyMap::g_controllerMap[pspKey_][actionIndex_] = kdf; break; + default: + ; } refresh_ = true; }