fix iOS text input and export ppbr

This commit is contained in:
2019-09-19 15:25:33 +02:00
parent 77a3bdde03
commit b8c646f748
6 changed files with 27 additions and 22 deletions

View File

@@ -211,11 +211,14 @@ std::recursive_mutex lock_mutex;
- (void)insertText:(NSString *)text
{
if (const char* cstr = [text cStringUsingEncoding:NSASCIIStringEncoding])
if (const char* cstr = [text cStringUsingEncoding:NSISOLatin1StringEncoding])
{
char c = cstr[0];
App::I->ui_task_async([=]
{
App::I->key_char(cstr[0]);
App::I->key_char(c);
});
}
NSLog(@"%@", text);
// Do something with the typed character
}
@@ -491,7 +494,7 @@ std::set<UITouch*> ignored_touch;
view.drawableDepthFormat = GLKViewDrawableDepthFormat24;
view.enableSetNeedsDisplay = NO;
glview = view;
App::I->width = view.frame.size.width * view.contentScaleFactor;
App::I->height = view.frame.size.height * view.contentScaleFactor;
App::I->zoom = Settings::value_or<Serializer::Float>("ui-scale", (float)view.contentScaleFactor);