mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-09-30 10:17:23 +02:00
Replace utfcpp by UTF8.h in KeyPoll.cpp
This commit is contained in:
parent
c5a48776c9
commit
a545384677
1 changed files with 2 additions and 4 deletions
|
@ -2,7 +2,6 @@
|
||||||
#include "KeyPoll.h"
|
#include "KeyPoll.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <utf8/unchecked.h>
|
|
||||||
|
|
||||||
#include "Alloc.h"
|
#include "Alloc.h"
|
||||||
#include "Exit.h"
|
#include "Exit.h"
|
||||||
|
@ -13,6 +12,7 @@
|
||||||
#include "LocalizationStorage.h"
|
#include "LocalizationStorage.h"
|
||||||
#include "Music.h"
|
#include "Music.h"
|
||||||
#include "Screen.h"
|
#include "Screen.h"
|
||||||
|
#include "UTF8.h"
|
||||||
#include "Vlogging.h"
|
#include "Vlogging.h"
|
||||||
|
|
||||||
int inline KeyPoll::getThreshold(void)
|
int inline KeyPoll::getThreshold(void)
|
||||||
|
@ -178,9 +178,7 @@ void KeyPoll::Poll(void)
|
||||||
{
|
{
|
||||||
if (evt.key.keysym.sym == SDLK_BACKSPACE && !keybuffer.empty())
|
if (evt.key.keysym.sym == SDLK_BACKSPACE && !keybuffer.empty())
|
||||||
{
|
{
|
||||||
std::string::iterator iter = keybuffer.end();
|
keybuffer.erase(UTF8_backspace(keybuffer.c_str(), keybuffer.length()));
|
||||||
utf8::unchecked::prior(iter);
|
|
||||||
keybuffer = keybuffer.substr(0, iter - keybuffer.begin());
|
|
||||||
if (keybuffer.empty())
|
if (keybuffer.empty())
|
||||||
{
|
{
|
||||||
linealreadyemptykludge = true;
|
linealreadyemptykludge = true;
|
||||||
|
|
Loading…
Reference in a new issue