mid模拟器

  • 时间:
  • 浏览:0
  • 来源:虚拟情报站

mid模拟器

在这个数字化的时代,mid模拟器的更新速度越来越快。今天,我将和大家分享关于mid模拟器的今日更新,让我们一起跟上时代的步伐。

文章目录列表:

1.mid?????

2.请问安卓系统玩游戏时怎样旋转屏幕?我是用安卓模拟器在电脑模拟的!

mid?????

连线的原则是:相同设备用交叉线,不同设备用直通线。

原因是:相同的设备定义的阵脚功能都相同,如1号阵脚发送,2号阵脚接受,如果两边的设备相同使用直通线就无法通行。所以需要使用交叉线。

这里的相同设备并不是单纯的名称相同,而是他的功能相同。计算机是一个全七层设备,通过配置可以将计算机配置才路由器,所以认为计算机和路由器是相同设备。另外交换机和集线器已被认为是相同设备。他们之间互联应该使用交叉线。

以前的设备都是使用MID标准。现在的新设备如果支持MIDX标准可以实现内部自动调整线序。

请问安卓系统玩游戏时怎样旋转屏幕?我是用安卓模拟器在电脑模拟的!

android 屏幕旋转 屏是LANDSCAPE的,要让它默认显示为PORTRAIT. 1.kernel里要旋转FrameBuffer. 启动参数里加入fbcon=rotate:1 (0:正常屏; 1:顺时钟转90度; 2:转180度; 3:顺时钟转270度;) _后生成的autoconf.h里有类似项: #define CONFIG_CMDLINE "c_ole=ttySAC0,115200 fbcon=rotate:1" 此项的解析在$(kernel)/drivers/video/c_ole/fbcon.c static int __init fb_c_ole_setup(char *this_opt); 只是去初始化变量initial_rotation,然后initial_rotation会传递给其他需要的结构。 注意:参考$(kernel)/documentation/fb/fbcon.txt 2.android OS旋转屏幕 系统默认是针对竖屏的,而MID使用的是横屏,所以需要做一个转换的动作。 PORTRAIT LANDSCAPE <------屏幕显示方式 ROTATION_0 ROTATION_90 ROTATION_90 ROTATION_180 ROTATION_180 ROTATION_270 ROTATION_270 ROTATION_0 而source code里对ROTATION_180和ROTATION_270的处理比较少,只在sensor和KeyQueue部分,所以如果只是要让系统显示为竖屏,将android中的Surface.ROTATION_0改为Surface.ROTATION_90,而Surface.ROTATION_90改为Surface.ROTATION_0。 这样,启动后的屏幕就是竖屏的了。 改动后,启动时还是LANDSCAPE显示的,进入HOME也是,很快就会自动旋转到PORTRAIT模式这是由于 $(cupcake)/frameworks/base/services/java/com/android/server/WindowManagerService.java 中enableScreenAfterBoot()->performEnableScreen()->mPolicy.enableScreenAfterBoot(), mPolicy为父类指针,可以指向 PhoneWindowManager或者MidWindowManager,由配置文件$(cupcake)/build/target/product/core.mk中 PRODUCT_POLICY :=android.policy_phone //PRODUCT_POLICY :=android.policy_mid 来_。 PhoneWindowManager::enableScreenAfterBoot()->updateRotation(Surface.FLAGS_ORIENTATION_ANIMATION_DISABLE)->mWindowManager.setRotation()完成设置旋转并清除LOGO. 3.启动过程中竖屏 启动过程中,默认是按照屏的width和height显示的,不会旋转,要使它显示logo时就是竖屏的,也就是旋转90度,需要做如下工作: $(cupcake)/frameworks/base/libs/surfaceflinger/SurfaceFlinger.cpp status_t SurfaceFlinger::readyToRun()中 //c_t uint32_t w=hw.getWidth(); //c_t uint32_t h=hw.getHeight(); //swap w&h for portrait display in landscape panel. jeff. c_t uint32_t h=hw.getWidth(); c_t uint32_t w=hw.getHeight(); 交换一下width和height,这样后面用OpenGL创建的ViewPort形状就是竖的了。修改后面的函数参数也可以,不过太多了,交换一下省事。但是怎么让这个竖的viewport旋转90度呢?这里就要用到GraphicPlane::mGlobalTran_orm这个Tran_orm了。它指示当前_终要旋转的结果。 所以要在创建GraphicPlane时初始化mGlobalTran_orm为旋转90度。 GraphicPlane::GraphicPlane() : mHw(0) { //add by jeff. for default rotate angel 90 mOrientationTran_orm.reset(); mOrientation=ISurfaceComposer::eOrientation90; mGlobalTran_orm=mOrientationTran_orm * mTran_orm; } 此段从status_t GraphicPlane::setOrientation(int orientation)复制过来,注意修改mGlobalTran_orm: if (orientation==ISurfaceComposer::eOrientation90) { //ISurfaceComposer::eOrientationDefault //jeff // make sure the default orientation is optimal mOrientationTran_orm.reset(); mOrientation=orientation; //mGlobalTran_orm=mTran_orm; mGlobalTran_orm=mOrientationTran_orm * mTran_orm; //jeff return NO_ERROR; } 注意mOrientationTran_orm.reset();要修改为默认旋转90度。参照status_t GraphicPlane::orientationToTran_rom 中的设置,修改为:_oid Tran_orm::reset() { mTran_orm.reset(); mType=0; set(0,-1,1,0); //jeff set(800,0); } 参考: status_t GraphicPlane::orientationToTran_rom( int orientation, int w, int h, Tran_orm* tr) { float a, b, c, d, x, y; switch (orientation) { case ISurfaceComposer::eOrientationDefault: a=1; b=0; c=0; d=1; x=0; y=0; break; case ISurfaceComposer::eOrientation90: a=0; b=-1; c=1; d=0; x=w; y=0; break; case ISurfaceComposer::eOrientation180: a=-1; b=0; c=0; d=-1; x=w; y=h; break; case ISurfaceComposer::eOrientation270: a=0; b=1; c=-1; d=0; x=0; y=h; break; default: return BAD_VALUE; } tr->set(a, b, c, d); tr->set(x, y); return NO_ERROR; } 修改之后,默认就是竖屏(旋转90度)显示了。

好了,今天关于“mid模拟器”的话题就讲到这里了。希望大家能够通过我的介绍对“mid模拟器”有更全面的认识,并且能够在今后的实践中更好地运用所学知识。如果您有任何问题或需要进一步的信息,请随时告诉我。