mirror of
https://github.com/ogoguel/activegs-ios.git
synced 2024-12-21 08:32:10 +00:00
Fixed video displaying in iOS 15
This commit is contained in:
parent
78cb587478
commit
10e2b560b9
@ -74,7 +74,7 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.42</string>
|
||||
<string>$(MARKETING_VERSION)</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
|
@ -55,7 +55,7 @@ int messageLineVBL=0;
|
||||
|
||||
|
||||
|
||||
void x_async_refresh(CGContextRef myContext,CGRect myBoundingBox)
|
||||
void x_async_refresh(CGContextRef myContext,CGRect myBoundingBox, CGImageRef *imageRef)
|
||||
{
|
||||
|
||||
#ifdef ENABLEQD
|
||||
@ -92,10 +92,17 @@ void x_async_refresh(CGContextRef myContext,CGRect myBoundingBox)
|
||||
|
||||
|
||||
CGImageRef myImage = CGBitmapContextCreateImage((CGContextRef)g_kimage_offscreen.dev_handle);
|
||||
|
||||
|
||||
|
||||
CGContextDrawImage(myContext, myBoundingBox, myImage);// 6
|
||||
*imageRef = CGBitmapContextCreateImage((CGContextRef)g_kimage_offscreen.dev_handle);
|
||||
|
||||
// Yoshi debugging: iOS 15 issue
|
||||
// CGContextDrawImage draws a blank if the target rect width values in 233 ... 235
|
||||
// Raw image size of screen is 704x221.
|
||||
// Rect size here is 234.6667 x 77 for 3x retina size display (iPhone)
|
||||
// Calling CGContextDrawImage using this rect results in a blank image
|
||||
// width of 234.0 and 235.0 does not work
|
||||
// adding 3 to the width here renders the image
|
||||
CGRect newRect = CGRectMake(myBoundingBox.origin.x, myBoundingBox.origin.y, myBoundingBox.size.width + 3.0, myBoundingBox.size.height);
|
||||
CGContextDrawImage(myContext, newRect, myImage);// 6
|
||||
|
||||
#ifndef VIDEO_SINGLEVLINE
|
||||
if (r_sim65816.get_video_fx() == VIDEOFX_CRT)
|
||||
|
@ -9,7 +9,7 @@
|
||||
#import <UIKit/UIKit.h>
|
||||
#include <QuartzCore/CADisplayLink.h>
|
||||
|
||||
extern void x_async_refresh(CGContextRef myContext,CGRect r);
|
||||
extern void x_async_refresh(CGContextRef myContext,CGRect r, CGImageRef *imageRef);
|
||||
extern void add_event_key(int,int);
|
||||
extern void add_event_mouse(int _x,int _y, int _state, int _button);
|
||||
extern void add_event_modifier(unsigned int state) ;
|
||||
|
@ -86,13 +86,19 @@ void x_invalidrect()
|
||||
{
|
||||
|
||||
CGContextRef g = UIGraphicsGetCurrentContext();
|
||||
x_async_refresh(g,rect);
|
||||
|
||||
// // yoshi test...
|
||||
// CGImageRef imgRef = CGBitmapContextCreateImage(g);
|
||||
// UIImage *image = [UIImage imageWithCGImage:imgRef];
|
||||
// CGImageRelease(imgRef);
|
||||
// NSLog(@"yoshi buffer image = %@",image);
|
||||
|
||||
CGImageRef imageRef;
|
||||
x_async_refresh(g,rect,&imageRef);
|
||||
// // yoshi test...
|
||||
// CGImageRef imgRef = CGBitmapContextCreateImage(g);
|
||||
// UIImage *image = [UIImage imageWithCGImage:imgRef];
|
||||
// CGImageRelease(imgRef);
|
||||
// NSLog(@"yoshi buffer image = %@",image);
|
||||
// if ( imageRef != nil ) {
|
||||
// UIImage *image = [[UIImage alloc] initWithCGImage:imageRef];
|
||||
// NSLog(@"yoshi debug: image = %@",image.description);
|
||||
// CGContextDrawImage(g, CGRectMake(0, 0, 275, 77), imageRef);
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
|
@ -133,7 +133,7 @@ float refScaleLandscape;
|
||||
self->viewSize = frame.size;
|
||||
self->dpiRatio = ratio;
|
||||
|
||||
CGRect r = CGRectMake(0.0,0.0,X_A2_WINDOW_WIDTH/self->dpiRatio ,X_A2_WINDOW_HEIGHT/self->dpiRatio );
|
||||
CGRect r = CGRectMake(0.0,0.0, X_A2_WINDOW_WIDTH/self->dpiRatio, X_A2_WINDOW_HEIGHT/self->dpiRatio );
|
||||
|
||||
self.contentSize = CGSizeMake(r.size.width,r.size.height);
|
||||
[self.ew setFrame:r];
|
||||
|
Loading…
Reference in New Issue
Block a user