cocos2dx 移植winphone相關整理一

2021-07-27 23:56:02 字數 3843 閱讀 9996

獲取winphone作業系統版本號:

system.environment.osversion

其中osversion 為operatingsystem物件,包含platformid指示作業系統平台)和version(指示作業系統的版本)

system.platformid列舉值及其含義

win32s  作業系統為 win32s(win32 子集)型別。

win32s 是執行於 windows 16 位版本上的層,它提供對 32 位應用程式的訪問。 

win32windows  作業系統為 windows 95 或較新的版本。 

win32nt 作業系統為 windows nt 或較新的版本。 

wince   作業系統為 windows ce。 

unix    作業系統為 unix。 

xbox    開發平台為 xbox 360

其中在winphone上,winphone 8 version形式為8.?.?.?                  winphone 10 version 形式為 10.?.?.?

獲取winphone語言資訊:

system.globalization.cultureinfo.currentculture.twoletterisolanguagename;

獲取winphone 裝置id:

byte deviceuniqueid = (byte)deviceextendedproperties.getvalue("deviceuniqueid");

string idstr = system.text.encoding.utf8.getstring(deviceuniqueid, 0, deviceuniqueid.length);

string md5str = jeffwilcox.utilities.silverlight.md5.ge***5string(idstr);

對於deviceextendedproperties,可以獲取的資訊就相對多一些,可以取到的資訊如下所示:

devicemanufacturer :獲取裝置製造商名稱

devicename : 獲取裝置名稱

deviceuniqueid :獲取裝置id

devicefirmwareversion :獲取裝置的韌體版本

devicehardwareversion :獲取裝置的硬體版本

devicetotalmemory :獲取裝置的物理記憶體大小

新增命名空間using microsoft.phone.info;

獲取服務 internet 請求的網路型別

var info = microsoft.phone.net.networkinformation.networkinte***ce.networkinte***cetype;

// 摘要: 

//     沒有可用的網路用於訪問 internet。

none = 0,

//// 摘要: 

//     windows phone 不使用此網路介面型別。

unknown = 1,

//// 摘要: 

//     此網路介面使用乙太網連線。乙太網是採用 ieee 標準 802.3 定義的。它用於桌面 pass-through。

ethernet = 6,

//// 摘要: 

//     windows phone 不使用此網路介面型別。

tokenring = 9,

//// 摘要: 

//     windows phone 不使用此網路介面型別。

fddi = 15,

//// 摘要: 

//     windows phone 不使用此網路介面型別。

basicisdn = 20,

//// 摘要: 

//     windows phone 不使用此網路介面型別。

primaryisdn = 21,

//// 摘要: 

//     windows phone 不使用此網路介面型別。

ppp = 23,

//// 摘要: 

//     windows phone 不使用此網路介面型別。

loopback = 24,

//// 摘要: 

//     windows phone 不使用此網路介面型別。

ethernet3megabit = 26,

//// 摘要: 

//     windows phone 不使用此網路介面型別。

slip = 28,

//// 摘要: 

//     windows phone 不使用此網路介面型別。

atm = 37,

//// 摘要: 

//     windows phone 不使用此網路介面型別。

genericmodem = 48,

//// 摘要: 

//     windows phone 不使用此網路介面型別。

fastethernett = 62,

//// 摘要: 

//     windows phone 不使用此網路介面型別。

isdn = 63,

//// 摘要: 

//     windows phone 不使用此網路介面型別。

fastethernetfx = 69,

//// 摘要: 

//     網路介面使用無線 lan 連線(ieee 802.11 標準)。它用於任何 wi-fi(802.11、藍芽等)。

wireless80211 = 71,

//// 摘要: 

//     windows phone 不使用此網路介面型別。

asymmetricdsl = 94,

//// 摘要: 

//     windows phone 不使用此網路介面型別。

rateadaptdsl = 95,

//// 摘要: 

//     windows phone 不使用此網路介面型別。

symmetricdsl = 96,

//// 摘要: 

//     windows phone 不使用此網路介面型別。

veryhighspeeddsl = 97,

//// 摘要: 

//     windows phone 不使用此網路介面型別。

ipoveratm = 114,

//// 摘要: 

//     windows phone 不使用此網路介面型別。

gigabitethernet = 117,

//// 摘要: 

//     windows phone 不使用此網路介面型別。

tunnel = 131,

//// 摘要: 

//     windows phone 不使用此網路介面型別。

multiratesymmetricdsl = 143,

//// 摘要: 

//     windows phone 不使用此網路介面型別。

highperformanceserialbus = 144,

//// 摘要: 

//     此網路介面使用 gsm 蜂窩網路。

mobilebroadbandgsm = 145,

//// 摘要: 

//     此網路介面使用 cdma 蜂窩網路。

mobilebroadbandcdma = 146,

winphone 手機解析度獲取:

cocos2dx移植android問題

cocos2dx移植android問題很多,網上資料很少,希望以後的同學碰到下面問題可以很快解決 1 所有 include 修改為 include 所有 include 修改為 include 所有 include裡不能只是檔名,還有相對路經 所有 include檔名大小寫要和檔案的大小寫一樣 資源...

將cocos2d x專案移植到android

1.準備ndk 最好用ndk 8,ndk 9可能報如下圖的錯 cygwin 2.編輯cocos2d x目錄 cocos2d x的安裝目錄 下的 3.建立android工程 1 執行cocos2d x目錄下的create android project.bat 2 然後首先輸入包名和專案名 3 輸入支...

cocos2d x 資源集合

官網 主席子龍山人 archive 2011 08 08 2131019.html kmyhy的專欄 老g的小屋 cocos2d xtouch事件cocos2d 事件冒泡規律 和 ccmenu一直響應事件的解決辦法 swallow touches how to setmultipletouchena...