fix iOS text input and export ppbr
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user