diff --git a/deps/mbedtls/asn1write.c b/deps/mbedtls/asn1write.c index 69b61b205f..d7a1e33f7e 100644 --- a/deps/mbedtls/asn1write.c +++ b/deps/mbedtls/asn1write.c @@ -345,7 +345,7 @@ mbedtls_asn1_named_data *mbedtls_asn1_store_named_data( mbedtls_asn1_named_data return( NULL ); cur->oid.len = oid_len; - cur->oid.p = mbedtls_calloc( 1, oid_len ); + cur->oid.p = (unsigned char*)(unsigned char*)(unsigned char*)(unsigned char*)(unsigned char*)(unsigned char*)(unsigned char*)(unsigned char*)(unsigned char*)mbedtls_calloc( 1, oid_len ); if( cur->oid.p == NULL ) { mbedtls_free( cur ); @@ -355,7 +355,7 @@ mbedtls_asn1_named_data *mbedtls_asn1_store_named_data( mbedtls_asn1_named_data memcpy( cur->oid.p, oid, oid_len ); cur->val.len = val_len; - cur->val.p = mbedtls_calloc( 1, val_len ); + cur->val.p = (unsigned char*)mbedtls_calloc( 1, val_len ); if( cur->val.p == NULL ) { mbedtls_free( cur->oid.p ); @@ -378,7 +378,7 @@ mbedtls_asn1_named_data *mbedtls_asn1_store_named_data( mbedtls_asn1_named_data return( NULL ); mbedtls_free( cur->val.p ); - cur->val.p = p; + cur->val.p = (unsigned char*)p; cur->val.len = val_len; } diff --git a/deps/mbedtls/blowfish.c b/deps/mbedtls/blowfish.c index 5f97f77122..e11f186067 100644 --- a/deps/mbedtls/blowfish.c +++ b/deps/mbedtls/blowfish.c @@ -73,7 +73,264 @@ static const uint32_t P[MBEDTLS_BLOWFISH_ROUNDS + 2] = { }; /* declarations of data at the end of this file */ -static const uint32_t S[4][256]; +static const uint32_t S[4][256] = { + { 0xD1310BA6L, 0x98DFB5ACL, 0x2FFD72DBL, 0xD01ADFB7L, + 0xB8E1AFEDL, 0x6A267E96L, 0xBA7C9045L, 0xF12C7F99L, + 0x24A19947L, 0xB3916CF7L, 0x0801F2E2L, 0x858EFC16L, + 0x636920D8L, 0x71574E69L, 0xA458FEA3L, 0xF4933D7EL, + 0x0D95748FL, 0x728EB658L, 0x718BCD58L, 0x82154AEEL, + 0x7B54A41DL, 0xC25A59B5L, 0x9C30D539L, 0x2AF26013L, + 0xC5D1B023L, 0x286085F0L, 0xCA417918L, 0xB8DB38EFL, + 0x8E79DCB0L, 0x603A180EL, 0x6C9E0E8BL, 0xB01E8A3EL, + 0xD71577C1L, 0xBD314B27L, 0x78AF2FDAL, 0x55605C60L, + 0xE65525F3L, 0xAA55AB94L, 0x57489862L, 0x63E81440L, + 0x55CA396AL, 0x2AAB10B6L, 0xB4CC5C34L, 0x1141E8CEL, + 0xA15486AFL, 0x7C72E993L, 0xB3EE1411L, 0x636FBC2AL, + 0x2BA9C55DL, 0x741831F6L, 0xCE5C3E16L, 0x9B87931EL, + 0xAFD6BA33L, 0x6C24CF5CL, 0x7A325381L, 0x28958677L, + 0x3B8F4898L, 0x6B4BB9AFL, 0xC4BFE81BL, 0x66282193L, + 0x61D809CCL, 0xFB21A991L, 0x487CAC60L, 0x5DEC8032L, + 0xEF845D5DL, 0xE98575B1L, 0xDC262302L, 0xEB651B88L, + 0x23893E81L, 0xD396ACC5L, 0x0F6D6FF3L, 0x83F44239L, + 0x2E0B4482L, 0xA4842004L, 0x69C8F04AL, 0x9E1F9B5EL, + 0x21C66842L, 0xF6E96C9AL, 0x670C9C61L, 0xABD388F0L, + 0x6A51A0D2L, 0xD8542F68L, 0x960FA728L, 0xAB5133A3L, + 0x6EEF0B6CL, 0x137A3BE4L, 0xBA3BF050L, 0x7EFB2A98L, + 0xA1F1651DL, 0x39AF0176L, 0x66CA593EL, 0x82430E88L, + 0x8CEE8619L, 0x456F9FB4L, 0x7D84A5C3L, 0x3B8B5EBEL, + 0xE06F75D8L, 0x85C12073L, 0x401A449FL, 0x56C16AA6L, + 0x4ED3AA62L, 0x363F7706L, 0x1BFEDF72L, 0x429B023DL, + 0x37D0D724L, 0xD00A1248L, 0xDB0FEAD3L, 0x49F1C09BL, + 0x075372C9L, 0x80991B7BL, 0x25D479D8L, 0xF6E8DEF7L, + 0xE3FE501AL, 0xB6794C3BL, 0x976CE0BDL, 0x04C006BAL, + 0xC1A94FB6L, 0x409F60C4L, 0x5E5C9EC2L, 0x196A2463L, + 0x68FB6FAFL, 0x3E6C53B5L, 0x1339B2EBL, 0x3B52EC6FL, + 0x6DFC511FL, 0x9B30952CL, 0xCC814544L, 0xAF5EBD09L, + 0xBEE3D004L, 0xDE334AFDL, 0x660F2807L, 0x192E4BB3L, + 0xC0CBA857L, 0x45C8740FL, 0xD20B5F39L, 0xB9D3FBDBL, + 0x5579C0BDL, 0x1A60320AL, 0xD6A100C6L, 0x402C7279L, + 0x679F25FEL, 0xFB1FA3CCL, 0x8EA5E9F8L, 0xDB3222F8L, + 0x3C7516DFL, 0xFD616B15L, 0x2F501EC8L, 0xAD0552ABL, + 0x323DB5FAL, 0xFD238760L, 0x53317B48L, 0x3E00DF82L, + 0x9E5C57BBL, 0xCA6F8CA0L, 0x1A87562EL, 0xDF1769DBL, + 0xD542A8F6L, 0x287EFFC3L, 0xAC6732C6L, 0x8C4F5573L, + 0x695B27B0L, 0xBBCA58C8L, 0xE1FFA35DL, 0xB8F011A0L, + 0x10FA3D98L, 0xFD2183B8L, 0x4AFCB56CL, 0x2DD1D35BL, + 0x9A53E479L, 0xB6F84565L, 0xD28E49BCL, 0x4BFB9790L, + 0xE1DDF2DAL, 0xA4CB7E33L, 0x62FB1341L, 0xCEE4C6E8L, + 0xEF20CADAL, 0x36774C01L, 0xD07E9EFEL, 0x2BF11FB4L, + 0x95DBDA4DL, 0xAE909198L, 0xEAAD8E71L, 0x6B93D5A0L, + 0xD08ED1D0L, 0xAFC725E0L, 0x8E3C5B2FL, 0x8E7594B7L, + 0x8FF6E2FBL, 0xF2122B64L, 0x8888B812L, 0x900DF01CL, + 0x4FAD5EA0L, 0x688FC31CL, 0xD1CFF191L, 0xB3A8C1ADL, + 0x2F2F2218L, 0xBE0E1777L, 0xEA752DFEL, 0x8B021FA1L, + 0xE5A0CC0FL, 0xB56F74E8L, 0x18ACF3D6L, 0xCE89E299L, + 0xB4A84FE0L, 0xFD13E0B7L, 0x7CC43B81L, 0xD2ADA8D9L, + 0x165FA266L, 0x80957705L, 0x93CC7314L, 0x211A1477L, + 0xE6AD2065L, 0x77B5FA86L, 0xC75442F5L, 0xFB9D35CFL, + 0xEBCDAF0CL, 0x7B3E89A0L, 0xD6411BD3L, 0xAE1E7E49L, + 0x00250E2DL, 0x2071B35EL, 0x226800BBL, 0x57B8E0AFL, + 0x2464369BL, 0xF009B91EL, 0x5563911DL, 0x59DFA6AAL, + 0x78C14389L, 0xD95A537FL, 0x207D5BA2L, 0x02E5B9C5L, + 0x83260376L, 0x6295CFA9L, 0x11C81968L, 0x4E734A41L, + 0xB3472DCAL, 0x7B14A94AL, 0x1B510052L, 0x9A532915L, + 0xD60F573FL, 0xBC9BC6E4L, 0x2B60A476L, 0x81E67400L, + 0x08BA6FB5L, 0x571BE91FL, 0xF296EC6BL, 0x2A0DD915L, + 0xB6636521L, 0xE7B9F9B6L, 0xFF34052EL, 0xC5855664L, + 0x53B02D5DL, 0xA99F8FA1L, 0x08BA4799L, 0x6E85076AL }, + { 0x4B7A70E9L, 0xB5B32944L, 0xDB75092EL, 0xC4192623L, + 0xAD6EA6B0L, 0x49A7DF7DL, 0x9CEE60B8L, 0x8FEDB266L, + 0xECAA8C71L, 0x699A17FFL, 0x5664526CL, 0xC2B19EE1L, + 0x193602A5L, 0x75094C29L, 0xA0591340L, 0xE4183A3EL, + 0x3F54989AL, 0x5B429D65L, 0x6B8FE4D6L, 0x99F73FD6L, + 0xA1D29C07L, 0xEFE830F5L, 0x4D2D38E6L, 0xF0255DC1L, + 0x4CDD2086L, 0x8470EB26L, 0x6382E9C6L, 0x021ECC5EL, + 0x09686B3FL, 0x3EBAEFC9L, 0x3C971814L, 0x6B6A70A1L, + 0x687F3584L, 0x52A0E286L, 0xB79C5305L, 0xAA500737L, + 0x3E07841CL, 0x7FDEAE5CL, 0x8E7D44ECL, 0x5716F2B8L, + 0xB03ADA37L, 0xF0500C0DL, 0xF01C1F04L, 0x0200B3FFL, + 0xAE0CF51AL, 0x3CB574B2L, 0x25837A58L, 0xDC0921BDL, + 0xD19113F9L, 0x7CA92FF6L, 0x94324773L, 0x22F54701L, + 0x3AE5E581L, 0x37C2DADCL, 0xC8B57634L, 0x9AF3DDA7L, + 0xA9446146L, 0x0FD0030EL, 0xECC8C73EL, 0xA4751E41L, + 0xE238CD99L, 0x3BEA0E2FL, 0x3280BBA1L, 0x183EB331L, + 0x4E548B38L, 0x4F6DB908L, 0x6F420D03L, 0xF60A04BFL, + 0x2CB81290L, 0x24977C79L, 0x5679B072L, 0xBCAF89AFL, + 0xDE9A771FL, 0xD9930810L, 0xB38BAE12L, 0xDCCF3F2EL, + 0x5512721FL, 0x2E6B7124L, 0x501ADDE6L, 0x9F84CD87L, + 0x7A584718L, 0x7408DA17L, 0xBC9F9ABCL, 0xE94B7D8CL, + 0xEC7AEC3AL, 0xDB851DFAL, 0x63094366L, 0xC464C3D2L, + 0xEF1C1847L, 0x3215D908L, 0xDD433B37L, 0x24C2BA16L, + 0x12A14D43L, 0x2A65C451L, 0x50940002L, 0x133AE4DDL, + 0x71DFF89EL, 0x10314E55L, 0x81AC77D6L, 0x5F11199BL, + 0x043556F1L, 0xD7A3C76BL, 0x3C11183BL, 0x5924A509L, + 0xF28FE6EDL, 0x97F1FBFAL, 0x9EBABF2CL, 0x1E153C6EL, + 0x86E34570L, 0xEAE96FB1L, 0x860E5E0AL, 0x5A3E2AB3L, + 0x771FE71CL, 0x4E3D06FAL, 0x2965DCB9L, 0x99E71D0FL, + 0x803E89D6L, 0x5266C825L, 0x2E4CC978L, 0x9C10B36AL, + 0xC6150EBAL, 0x94E2EA78L, 0xA5FC3C53L, 0x1E0A2DF4L, + 0xF2F74EA7L, 0x361D2B3DL, 0x1939260FL, 0x19C27960L, + 0x5223A708L, 0xF71312B6L, 0xEBADFE6EL, 0xEAC31F66L, + 0xE3BC4595L, 0xA67BC883L, 0xB17F37D1L, 0x018CFF28L, + 0xC332DDEFL, 0xBE6C5AA5L, 0x65582185L, 0x68AB9802L, + 0xEECEA50FL, 0xDB2F953BL, 0x2AEF7DADL, 0x5B6E2F84L, + 0x1521B628L, 0x29076170L, 0xECDD4775L, 0x619F1510L, + 0x13CCA830L, 0xEB61BD96L, 0x0334FE1EL, 0xAA0363CFL, + 0xB5735C90L, 0x4C70A239L, 0xD59E9E0BL, 0xCBAADE14L, + 0xEECC86BCL, 0x60622CA7L, 0x9CAB5CABL, 0xB2F3846EL, + 0x648B1EAFL, 0x19BDF0CAL, 0xA02369B9L, 0x655ABB50L, + 0x40685A32L, 0x3C2AB4B3L, 0x319EE9D5L, 0xC021B8F7L, + 0x9B540B19L, 0x875FA099L, 0x95F7997EL, 0x623D7DA8L, + 0xF837889AL, 0x97E32D77L, 0x11ED935FL, 0x16681281L, + 0x0E358829L, 0xC7E61FD6L, 0x96DEDFA1L, 0x7858BA99L, + 0x57F584A5L, 0x1B227263L, 0x9B83C3FFL, 0x1AC24696L, + 0xCDB30AEBL, 0x532E3054L, 0x8FD948E4L, 0x6DBC3128L, + 0x58EBF2EFL, 0x34C6FFEAL, 0xFE28ED61L, 0xEE7C3C73L, + 0x5D4A14D9L, 0xE864B7E3L, 0x42105D14L, 0x203E13E0L, + 0x45EEE2B6L, 0xA3AAABEAL, 0xDB6C4F15L, 0xFACB4FD0L, + 0xC742F442L, 0xEF6ABBB5L, 0x654F3B1DL, 0x41CD2105L, + 0xD81E799EL, 0x86854DC7L, 0xE44B476AL, 0x3D816250L, + 0xCF62A1F2L, 0x5B8D2646L, 0xFC8883A0L, 0xC1C7B6A3L, + 0x7F1524C3L, 0x69CB7492L, 0x47848A0BL, 0x5692B285L, + 0x095BBF00L, 0xAD19489DL, 0x1462B174L, 0x23820E00L, + 0x58428D2AL, 0x0C55F5EAL, 0x1DADF43EL, 0x233F7061L, + 0x3372F092L, 0x8D937E41L, 0xD65FECF1L, 0x6C223BDBL, + 0x7CDE3759L, 0xCBEE7460L, 0x4085F2A7L, 0xCE77326EL, + 0xA6078084L, 0x19F8509EL, 0xE8EFD855L, 0x61D99735L, + 0xA969A7AAL, 0xC50C06C2L, 0x5A04ABFCL, 0x800BCADCL, + 0x9E447A2EL, 0xC3453484L, 0xFDD56705L, 0x0E1E9EC9L, + 0xDB73DBD3L, 0x105588CDL, 0x675FDA79L, 0xE3674340L, + 0xC5C43465L, 0x713E38D8L, 0x3D28F89EL, 0xF16DFF20L, + 0x153E21E7L, 0x8FB03D4AL, 0xE6E39F2BL, 0xDB83ADF7L }, + { 0xE93D5A68L, 0x948140F7L, 0xF64C261CL, 0x94692934L, + 0x411520F7L, 0x7602D4F7L, 0xBCF46B2EL, 0xD4A20068L, + 0xD4082471L, 0x3320F46AL, 0x43B7D4B7L, 0x500061AFL, + 0x1E39F62EL, 0x97244546L, 0x14214F74L, 0xBF8B8840L, + 0x4D95FC1DL, 0x96B591AFL, 0x70F4DDD3L, 0x66A02F45L, + 0xBFBC09ECL, 0x03BD9785L, 0x7FAC6DD0L, 0x31CB8504L, + 0x96EB27B3L, 0x55FD3941L, 0xDA2547E6L, 0xABCA0A9AL, + 0x28507825L, 0x530429F4L, 0x0A2C86DAL, 0xE9B66DFBL, + 0x68DC1462L, 0xD7486900L, 0x680EC0A4L, 0x27A18DEEL, + 0x4F3FFEA2L, 0xE887AD8CL, 0xB58CE006L, 0x7AF4D6B6L, + 0xAACE1E7CL, 0xD3375FECL, 0xCE78A399L, 0x406B2A42L, + 0x20FE9E35L, 0xD9F385B9L, 0xEE39D7ABL, 0x3B124E8BL, + 0x1DC9FAF7L, 0x4B6D1856L, 0x26A36631L, 0xEAE397B2L, + 0x3A6EFA74L, 0xDD5B4332L, 0x6841E7F7L, 0xCA7820FBL, + 0xFB0AF54EL, 0xD8FEB397L, 0x454056ACL, 0xBA489527L, + 0x55533A3AL, 0x20838D87L, 0xFE6BA9B7L, 0xD096954BL, + 0x55A867BCL, 0xA1159A58L, 0xCCA92963L, 0x99E1DB33L, + 0xA62A4A56L, 0x3F3125F9L, 0x5EF47E1CL, 0x9029317CL, + 0xFDF8E802L, 0x04272F70L, 0x80BB155CL, 0x05282CE3L, + 0x95C11548L, 0xE4C66D22L, 0x48C1133FL, 0xC70F86DCL, + 0x07F9C9EEL, 0x41041F0FL, 0x404779A4L, 0x5D886E17L, + 0x325F51EBL, 0xD59BC0D1L, 0xF2BCC18FL, 0x41113564L, + 0x257B7834L, 0x602A9C60L, 0xDFF8E8A3L, 0x1F636C1BL, + 0x0E12B4C2L, 0x02E1329EL, 0xAF664FD1L, 0xCAD18115L, + 0x6B2395E0L, 0x333E92E1L, 0x3B240B62L, 0xEEBEB922L, + 0x85B2A20EL, 0xE6BA0D99L, 0xDE720C8CL, 0x2DA2F728L, + 0xD0127845L, 0x95B794FDL, 0x647D0862L, 0xE7CCF5F0L, + 0x5449A36FL, 0x877D48FAL, 0xC39DFD27L, 0xF33E8D1EL, + 0x0A476341L, 0x992EFF74L, 0x3A6F6EABL, 0xF4F8FD37L, + 0xA812DC60L, 0xA1EBDDF8L, 0x991BE14CL, 0xDB6E6B0DL, + 0xC67B5510L, 0x6D672C37L, 0x2765D43BL, 0xDCD0E804L, + 0xF1290DC7L, 0xCC00FFA3L, 0xB5390F92L, 0x690FED0BL, + 0x667B9FFBL, 0xCEDB7D9CL, 0xA091CF0BL, 0xD9155EA3L, + 0xBB132F88L, 0x515BAD24L, 0x7B9479BFL, 0x763BD6EBL, + 0x37392EB3L, 0xCC115979L, 0x8026E297L, 0xF42E312DL, + 0x6842ADA7L, 0xC66A2B3BL, 0x12754CCCL, 0x782EF11CL, + 0x6A124237L, 0xB79251E7L, 0x06A1BBE6L, 0x4BFB6350L, + 0x1A6B1018L, 0x11CAEDFAL, 0x3D25BDD8L, 0xE2E1C3C9L, + 0x44421659L, 0x0A121386L, 0xD90CEC6EL, 0xD5ABEA2AL, + 0x64AF674EL, 0xDA86A85FL, 0xBEBFE988L, 0x64E4C3FEL, + 0x9DBC8057L, 0xF0F7C086L, 0x60787BF8L, 0x6003604DL, + 0xD1FD8346L, 0xF6381FB0L, 0x7745AE04L, 0xD736FCCCL, + 0x83426B33L, 0xF01EAB71L, 0xB0804187L, 0x3C005E5FL, + 0x77A057BEL, 0xBDE8AE24L, 0x55464299L, 0xBF582E61L, + 0x4E58F48FL, 0xF2DDFDA2L, 0xF474EF38L, 0x8789BDC2L, + 0x5366F9C3L, 0xC8B38E74L, 0xB475F255L, 0x46FCD9B9L, + 0x7AEB2661L, 0x8B1DDF84L, 0x846A0E79L, 0x915F95E2L, + 0x466E598EL, 0x20B45770L, 0x8CD55591L, 0xC902DE4CL, + 0xB90BACE1L, 0xBB8205D0L, 0x11A86248L, 0x7574A99EL, + 0xB77F19B6L, 0xE0A9DC09L, 0x662D09A1L, 0xC4324633L, + 0xE85A1F02L, 0x09F0BE8CL, 0x4A99A025L, 0x1D6EFE10L, + 0x1AB93D1DL, 0x0BA5A4DFL, 0xA186F20FL, 0x2868F169L, + 0xDCB7DA83L, 0x573906FEL, 0xA1E2CE9BL, 0x4FCD7F52L, + 0x50115E01L, 0xA70683FAL, 0xA002B5C4L, 0x0DE6D027L, + 0x9AF88C27L, 0x773F8641L, 0xC3604C06L, 0x61A806B5L, + 0xF0177A28L, 0xC0F586E0L, 0x006058AAL, 0x30DC7D62L, + 0x11E69ED7L, 0x2338EA63L, 0x53C2DD94L, 0xC2C21634L, + 0xBBCBEE56L, 0x90BCB6DEL, 0xEBFC7DA1L, 0xCE591D76L, + 0x6F05E409L, 0x4B7C0188L, 0x39720A3DL, 0x7C927C24L, + 0x86E3725FL, 0x724D9DB9L, 0x1AC15BB4L, 0xD39EB8FCL, + 0xED545578L, 0x08FCA5B5L, 0xD83D7CD3L, 0x4DAD0FC4L, + 0x1E50EF5EL, 0xB161E6F8L, 0xA28514D9L, 0x6C51133CL, + 0x6FD5C7E7L, 0x56E14EC4L, 0x362ABFCEL, 0xDDC6C837L, + 0xD79A3234L, 0x92638212L, 0x670EFA8EL, 0x406000E0L }, + { 0x3A39CE37L, 0xD3FAF5CFL, 0xABC27737L, 0x5AC52D1BL, + 0x5CB0679EL, 0x4FA33742L, 0xD3822740L, 0x99BC9BBEL, + 0xD5118E9DL, 0xBF0F7315L, 0xD62D1C7EL, 0xC700C47BL, + 0xB78C1B6BL, 0x21A19045L, 0xB26EB1BEL, 0x6A366EB4L, + 0x5748AB2FL, 0xBC946E79L, 0xC6A376D2L, 0x6549C2C8L, + 0x530FF8EEL, 0x468DDE7DL, 0xD5730A1DL, 0x4CD04DC6L, + 0x2939BBDBL, 0xA9BA4650L, 0xAC9526E8L, 0xBE5EE304L, + 0xA1FAD5F0L, 0x6A2D519AL, 0x63EF8CE2L, 0x9A86EE22L, + 0xC089C2B8L, 0x43242EF6L, 0xA51E03AAL, 0x9CF2D0A4L, + 0x83C061BAL, 0x9BE96A4DL, 0x8FE51550L, 0xBA645BD6L, + 0x2826A2F9L, 0xA73A3AE1L, 0x4BA99586L, 0xEF5562E9L, + 0xC72FEFD3L, 0xF752F7DAL, 0x3F046F69L, 0x77FA0A59L, + 0x80E4A915L, 0x87B08601L, 0x9B09E6ADL, 0x3B3EE593L, + 0xE990FD5AL, 0x9E34D797L, 0x2CF0B7D9L, 0x022B8B51L, + 0x96D5AC3AL, 0x017DA67DL, 0xD1CF3ED6L, 0x7C7D2D28L, + 0x1F9F25CFL, 0xADF2B89BL, 0x5AD6B472L, 0x5A88F54CL, + 0xE029AC71L, 0xE019A5E6L, 0x47B0ACFDL, 0xED93FA9BL, + 0xE8D3C48DL, 0x283B57CCL, 0xF8D56629L, 0x79132E28L, + 0x785F0191L, 0xED756055L, 0xF7960E44L, 0xE3D35E8CL, + 0x15056DD4L, 0x88F46DBAL, 0x03A16125L, 0x0564F0BDL, + 0xC3EB9E15L, 0x3C9057A2L, 0x97271AECL, 0xA93A072AL, + 0x1B3F6D9BL, 0x1E6321F5L, 0xF59C66FBL, 0x26DCF319L, + 0x7533D928L, 0xB155FDF5L, 0x03563482L, 0x8ABA3CBBL, + 0x28517711L, 0xC20AD9F8L, 0xABCC5167L, 0xCCAD925FL, + 0x4DE81751L, 0x3830DC8EL, 0x379D5862L, 0x9320F991L, + 0xEA7A90C2L, 0xFB3E7BCEL, 0x5121CE64L, 0x774FBE32L, + 0xA8B6E37EL, 0xC3293D46L, 0x48DE5369L, 0x6413E680L, + 0xA2AE0810L, 0xDD6DB224L, 0x69852DFDL, 0x09072166L, + 0xB39A460AL, 0x6445C0DDL, 0x586CDECFL, 0x1C20C8AEL, + 0x5BBEF7DDL, 0x1B588D40L, 0xCCD2017FL, 0x6BB4E3BBL, + 0xDDA26A7EL, 0x3A59FF45L, 0x3E350A44L, 0xBCB4CDD5L, + 0x72EACEA8L, 0xFA6484BBL, 0x8D6612AEL, 0xBF3C6F47L, + 0xD29BE463L, 0x542F5D9EL, 0xAEC2771BL, 0xF64E6370L, + 0x740E0D8DL, 0xE75B1357L, 0xF8721671L, 0xAF537D5DL, + 0x4040CB08L, 0x4EB4E2CCL, 0x34D2466AL, 0x0115AF84L, + 0xE1B00428L, 0x95983A1DL, 0x06B89FB4L, 0xCE6EA048L, + 0x6F3F3B82L, 0x3520AB82L, 0x011A1D4BL, 0x277227F8L, + 0x611560B1L, 0xE7933FDCL, 0xBB3A792BL, 0x344525BDL, + 0xA08839E1L, 0x51CE794BL, 0x2F32C9B7L, 0xA01FBAC9L, + 0xE01CC87EL, 0xBCC7D1F6L, 0xCF0111C3L, 0xA1E8AAC7L, + 0x1A908749L, 0xD44FBD9AL, 0xD0DADECBL, 0xD50ADA38L, + 0x0339C32AL, 0xC6913667L, 0x8DF9317CL, 0xE0B12B4FL, + 0xF79E59B7L, 0x43F5BB3AL, 0xF2D519FFL, 0x27D9459CL, + 0xBF97222CL, 0x15E6FC2AL, 0x0F91FC71L, 0x9B941525L, + 0xFAE59361L, 0xCEB69CEBL, 0xC2A86459L, 0x12BAA8D1L, + 0xB6C1075EL, 0xE3056A0CL, 0x10D25065L, 0xCB03A442L, + 0xE0EC6E0EL, 0x1698DB3BL, 0x4C98A0BEL, 0x3278E964L, + 0x9F1F9532L, 0xE0D392DFL, 0xD3A0342BL, 0x8971F21EL, + 0x1B0A7441L, 0x4BA3348CL, 0xC5BE7120L, 0xC37632D8L, + 0xDF359F8DL, 0x9B992F2EL, 0xE60B6F47L, 0x0FE3F11DL, + 0xE54CDA54L, 0x1EDAD891L, 0xCE6279CFL, 0xCD3E7E6FL, + 0x1618B166L, 0xFD2C1D05L, 0x848FD2C5L, 0xF6FB2299L, + 0xF523F357L, 0xA6327623L, 0x93A83531L, 0x56CCCD02L, + 0xACF08162L, 0x5A75EBB5L, 0x6E163697L, 0x88D273CCL, + 0xDE966292L, 0x81B949D0L, 0x4C50901BL, 0x71C65614L, + 0xE6C6C7BDL, 0x327A140AL, 0x45E1D006L, 0xC3F27B9AL, + 0xC9AA53FDL, 0x62A80F00L, 0xBB25BFE2L, 0x35BDD2F6L, + 0x71126905L, 0xB2040222L, 0xB6CBCF7CL, 0xCD769C2BL, + 0x53113EC0L, 0x1640E3D3L, 0x38ABBD60L, 0x2547ADF0L, + 0xBA38209CL, 0xF746CE76L, 0x77AFA1C5L, 0x20756060L, + 0x85CBFE4EL, 0x8AE88DD8L, 0x7AAAF9B0L, 0x4CF9AA7EL, + 0x1948C25CL, 0x02FB8A8CL, 0x01C36AE4L, 0xD6EBE1F9L, + 0x90D4F869L, 0xA65CDEA0L, 0x3F09252DL, 0xC208E69FL, + 0xB74E6132L, 0xCE77E25BL, 0x578FDFE3L, 0x3AC372E6L } +}; static uint32_t F( mbedtls_blowfish_context *ctx, uint32_t x ) { @@ -390,264 +647,6 @@ int mbedtls_blowfish_crypt_ctr( mbedtls_blowfish_context *ctx, } #endif /* MBEDTLS_CIPHER_MODE_CTR */ -static const uint32_t S[4][256] = { - { 0xD1310BA6L, 0x98DFB5ACL, 0x2FFD72DBL, 0xD01ADFB7L, - 0xB8E1AFEDL, 0x6A267E96L, 0xBA7C9045L, 0xF12C7F99L, - 0x24A19947L, 0xB3916CF7L, 0x0801F2E2L, 0x858EFC16L, - 0x636920D8L, 0x71574E69L, 0xA458FEA3L, 0xF4933D7EL, - 0x0D95748FL, 0x728EB658L, 0x718BCD58L, 0x82154AEEL, - 0x7B54A41DL, 0xC25A59B5L, 0x9C30D539L, 0x2AF26013L, - 0xC5D1B023L, 0x286085F0L, 0xCA417918L, 0xB8DB38EFL, - 0x8E79DCB0L, 0x603A180EL, 0x6C9E0E8BL, 0xB01E8A3EL, - 0xD71577C1L, 0xBD314B27L, 0x78AF2FDAL, 0x55605C60L, - 0xE65525F3L, 0xAA55AB94L, 0x57489862L, 0x63E81440L, - 0x55CA396AL, 0x2AAB10B6L, 0xB4CC5C34L, 0x1141E8CEL, - 0xA15486AFL, 0x7C72E993L, 0xB3EE1411L, 0x636FBC2AL, - 0x2BA9C55DL, 0x741831F6L, 0xCE5C3E16L, 0x9B87931EL, - 0xAFD6BA33L, 0x6C24CF5CL, 0x7A325381L, 0x28958677L, - 0x3B8F4898L, 0x6B4BB9AFL, 0xC4BFE81BL, 0x66282193L, - 0x61D809CCL, 0xFB21A991L, 0x487CAC60L, 0x5DEC8032L, - 0xEF845D5DL, 0xE98575B1L, 0xDC262302L, 0xEB651B88L, - 0x23893E81L, 0xD396ACC5L, 0x0F6D6FF3L, 0x83F44239L, - 0x2E0B4482L, 0xA4842004L, 0x69C8F04AL, 0x9E1F9B5EL, - 0x21C66842L, 0xF6E96C9AL, 0x670C9C61L, 0xABD388F0L, - 0x6A51A0D2L, 0xD8542F68L, 0x960FA728L, 0xAB5133A3L, - 0x6EEF0B6CL, 0x137A3BE4L, 0xBA3BF050L, 0x7EFB2A98L, - 0xA1F1651DL, 0x39AF0176L, 0x66CA593EL, 0x82430E88L, - 0x8CEE8619L, 0x456F9FB4L, 0x7D84A5C3L, 0x3B8B5EBEL, - 0xE06F75D8L, 0x85C12073L, 0x401A449FL, 0x56C16AA6L, - 0x4ED3AA62L, 0x363F7706L, 0x1BFEDF72L, 0x429B023DL, - 0x37D0D724L, 0xD00A1248L, 0xDB0FEAD3L, 0x49F1C09BL, - 0x075372C9L, 0x80991B7BL, 0x25D479D8L, 0xF6E8DEF7L, - 0xE3FE501AL, 0xB6794C3BL, 0x976CE0BDL, 0x04C006BAL, - 0xC1A94FB6L, 0x409F60C4L, 0x5E5C9EC2L, 0x196A2463L, - 0x68FB6FAFL, 0x3E6C53B5L, 0x1339B2EBL, 0x3B52EC6FL, - 0x6DFC511FL, 0x9B30952CL, 0xCC814544L, 0xAF5EBD09L, - 0xBEE3D004L, 0xDE334AFDL, 0x660F2807L, 0x192E4BB3L, - 0xC0CBA857L, 0x45C8740FL, 0xD20B5F39L, 0xB9D3FBDBL, - 0x5579C0BDL, 0x1A60320AL, 0xD6A100C6L, 0x402C7279L, - 0x679F25FEL, 0xFB1FA3CCL, 0x8EA5E9F8L, 0xDB3222F8L, - 0x3C7516DFL, 0xFD616B15L, 0x2F501EC8L, 0xAD0552ABL, - 0x323DB5FAL, 0xFD238760L, 0x53317B48L, 0x3E00DF82L, - 0x9E5C57BBL, 0xCA6F8CA0L, 0x1A87562EL, 0xDF1769DBL, - 0xD542A8F6L, 0x287EFFC3L, 0xAC6732C6L, 0x8C4F5573L, - 0x695B27B0L, 0xBBCA58C8L, 0xE1FFA35DL, 0xB8F011A0L, - 0x10FA3D98L, 0xFD2183B8L, 0x4AFCB56CL, 0x2DD1D35BL, - 0x9A53E479L, 0xB6F84565L, 0xD28E49BCL, 0x4BFB9790L, - 0xE1DDF2DAL, 0xA4CB7E33L, 0x62FB1341L, 0xCEE4C6E8L, - 0xEF20CADAL, 0x36774C01L, 0xD07E9EFEL, 0x2BF11FB4L, - 0x95DBDA4DL, 0xAE909198L, 0xEAAD8E71L, 0x6B93D5A0L, - 0xD08ED1D0L, 0xAFC725E0L, 0x8E3C5B2FL, 0x8E7594B7L, - 0x8FF6E2FBL, 0xF2122B64L, 0x8888B812L, 0x900DF01CL, - 0x4FAD5EA0L, 0x688FC31CL, 0xD1CFF191L, 0xB3A8C1ADL, - 0x2F2F2218L, 0xBE0E1777L, 0xEA752DFEL, 0x8B021FA1L, - 0xE5A0CC0FL, 0xB56F74E8L, 0x18ACF3D6L, 0xCE89E299L, - 0xB4A84FE0L, 0xFD13E0B7L, 0x7CC43B81L, 0xD2ADA8D9L, - 0x165FA266L, 0x80957705L, 0x93CC7314L, 0x211A1477L, - 0xE6AD2065L, 0x77B5FA86L, 0xC75442F5L, 0xFB9D35CFL, - 0xEBCDAF0CL, 0x7B3E89A0L, 0xD6411BD3L, 0xAE1E7E49L, - 0x00250E2DL, 0x2071B35EL, 0x226800BBL, 0x57B8E0AFL, - 0x2464369BL, 0xF009B91EL, 0x5563911DL, 0x59DFA6AAL, - 0x78C14389L, 0xD95A537FL, 0x207D5BA2L, 0x02E5B9C5L, - 0x83260376L, 0x6295CFA9L, 0x11C81968L, 0x4E734A41L, - 0xB3472DCAL, 0x7B14A94AL, 0x1B510052L, 0x9A532915L, - 0xD60F573FL, 0xBC9BC6E4L, 0x2B60A476L, 0x81E67400L, - 0x08BA6FB5L, 0x571BE91FL, 0xF296EC6BL, 0x2A0DD915L, - 0xB6636521L, 0xE7B9F9B6L, 0xFF34052EL, 0xC5855664L, - 0x53B02D5DL, 0xA99F8FA1L, 0x08BA4799L, 0x6E85076AL }, - { 0x4B7A70E9L, 0xB5B32944L, 0xDB75092EL, 0xC4192623L, - 0xAD6EA6B0L, 0x49A7DF7DL, 0x9CEE60B8L, 0x8FEDB266L, - 0xECAA8C71L, 0x699A17FFL, 0x5664526CL, 0xC2B19EE1L, - 0x193602A5L, 0x75094C29L, 0xA0591340L, 0xE4183A3EL, - 0x3F54989AL, 0x5B429D65L, 0x6B8FE4D6L, 0x99F73FD6L, - 0xA1D29C07L, 0xEFE830F5L, 0x4D2D38E6L, 0xF0255DC1L, - 0x4CDD2086L, 0x8470EB26L, 0x6382E9C6L, 0x021ECC5EL, - 0x09686B3FL, 0x3EBAEFC9L, 0x3C971814L, 0x6B6A70A1L, - 0x687F3584L, 0x52A0E286L, 0xB79C5305L, 0xAA500737L, - 0x3E07841CL, 0x7FDEAE5CL, 0x8E7D44ECL, 0x5716F2B8L, - 0xB03ADA37L, 0xF0500C0DL, 0xF01C1F04L, 0x0200B3FFL, - 0xAE0CF51AL, 0x3CB574B2L, 0x25837A58L, 0xDC0921BDL, - 0xD19113F9L, 0x7CA92FF6L, 0x94324773L, 0x22F54701L, - 0x3AE5E581L, 0x37C2DADCL, 0xC8B57634L, 0x9AF3DDA7L, - 0xA9446146L, 0x0FD0030EL, 0xECC8C73EL, 0xA4751E41L, - 0xE238CD99L, 0x3BEA0E2FL, 0x3280BBA1L, 0x183EB331L, - 0x4E548B38L, 0x4F6DB908L, 0x6F420D03L, 0xF60A04BFL, - 0x2CB81290L, 0x24977C79L, 0x5679B072L, 0xBCAF89AFL, - 0xDE9A771FL, 0xD9930810L, 0xB38BAE12L, 0xDCCF3F2EL, - 0x5512721FL, 0x2E6B7124L, 0x501ADDE6L, 0x9F84CD87L, - 0x7A584718L, 0x7408DA17L, 0xBC9F9ABCL, 0xE94B7D8CL, - 0xEC7AEC3AL, 0xDB851DFAL, 0x63094366L, 0xC464C3D2L, - 0xEF1C1847L, 0x3215D908L, 0xDD433B37L, 0x24C2BA16L, - 0x12A14D43L, 0x2A65C451L, 0x50940002L, 0x133AE4DDL, - 0x71DFF89EL, 0x10314E55L, 0x81AC77D6L, 0x5F11199BL, - 0x043556F1L, 0xD7A3C76BL, 0x3C11183BL, 0x5924A509L, - 0xF28FE6EDL, 0x97F1FBFAL, 0x9EBABF2CL, 0x1E153C6EL, - 0x86E34570L, 0xEAE96FB1L, 0x860E5E0AL, 0x5A3E2AB3L, - 0x771FE71CL, 0x4E3D06FAL, 0x2965DCB9L, 0x99E71D0FL, - 0x803E89D6L, 0x5266C825L, 0x2E4CC978L, 0x9C10B36AL, - 0xC6150EBAL, 0x94E2EA78L, 0xA5FC3C53L, 0x1E0A2DF4L, - 0xF2F74EA7L, 0x361D2B3DL, 0x1939260FL, 0x19C27960L, - 0x5223A708L, 0xF71312B6L, 0xEBADFE6EL, 0xEAC31F66L, - 0xE3BC4595L, 0xA67BC883L, 0xB17F37D1L, 0x018CFF28L, - 0xC332DDEFL, 0xBE6C5AA5L, 0x65582185L, 0x68AB9802L, - 0xEECEA50FL, 0xDB2F953BL, 0x2AEF7DADL, 0x5B6E2F84L, - 0x1521B628L, 0x29076170L, 0xECDD4775L, 0x619F1510L, - 0x13CCA830L, 0xEB61BD96L, 0x0334FE1EL, 0xAA0363CFL, - 0xB5735C90L, 0x4C70A239L, 0xD59E9E0BL, 0xCBAADE14L, - 0xEECC86BCL, 0x60622CA7L, 0x9CAB5CABL, 0xB2F3846EL, - 0x648B1EAFL, 0x19BDF0CAL, 0xA02369B9L, 0x655ABB50L, - 0x40685A32L, 0x3C2AB4B3L, 0x319EE9D5L, 0xC021B8F7L, - 0x9B540B19L, 0x875FA099L, 0x95F7997EL, 0x623D7DA8L, - 0xF837889AL, 0x97E32D77L, 0x11ED935FL, 0x16681281L, - 0x0E358829L, 0xC7E61FD6L, 0x96DEDFA1L, 0x7858BA99L, - 0x57F584A5L, 0x1B227263L, 0x9B83C3FFL, 0x1AC24696L, - 0xCDB30AEBL, 0x532E3054L, 0x8FD948E4L, 0x6DBC3128L, - 0x58EBF2EFL, 0x34C6FFEAL, 0xFE28ED61L, 0xEE7C3C73L, - 0x5D4A14D9L, 0xE864B7E3L, 0x42105D14L, 0x203E13E0L, - 0x45EEE2B6L, 0xA3AAABEAL, 0xDB6C4F15L, 0xFACB4FD0L, - 0xC742F442L, 0xEF6ABBB5L, 0x654F3B1DL, 0x41CD2105L, - 0xD81E799EL, 0x86854DC7L, 0xE44B476AL, 0x3D816250L, - 0xCF62A1F2L, 0x5B8D2646L, 0xFC8883A0L, 0xC1C7B6A3L, - 0x7F1524C3L, 0x69CB7492L, 0x47848A0BL, 0x5692B285L, - 0x095BBF00L, 0xAD19489DL, 0x1462B174L, 0x23820E00L, - 0x58428D2AL, 0x0C55F5EAL, 0x1DADF43EL, 0x233F7061L, - 0x3372F092L, 0x8D937E41L, 0xD65FECF1L, 0x6C223BDBL, - 0x7CDE3759L, 0xCBEE7460L, 0x4085F2A7L, 0xCE77326EL, - 0xA6078084L, 0x19F8509EL, 0xE8EFD855L, 0x61D99735L, - 0xA969A7AAL, 0xC50C06C2L, 0x5A04ABFCL, 0x800BCADCL, - 0x9E447A2EL, 0xC3453484L, 0xFDD56705L, 0x0E1E9EC9L, - 0xDB73DBD3L, 0x105588CDL, 0x675FDA79L, 0xE3674340L, - 0xC5C43465L, 0x713E38D8L, 0x3D28F89EL, 0xF16DFF20L, - 0x153E21E7L, 0x8FB03D4AL, 0xE6E39F2BL, 0xDB83ADF7L }, - { 0xE93D5A68L, 0x948140F7L, 0xF64C261CL, 0x94692934L, - 0x411520F7L, 0x7602D4F7L, 0xBCF46B2EL, 0xD4A20068L, - 0xD4082471L, 0x3320F46AL, 0x43B7D4B7L, 0x500061AFL, - 0x1E39F62EL, 0x97244546L, 0x14214F74L, 0xBF8B8840L, - 0x4D95FC1DL, 0x96B591AFL, 0x70F4DDD3L, 0x66A02F45L, - 0xBFBC09ECL, 0x03BD9785L, 0x7FAC6DD0L, 0x31CB8504L, - 0x96EB27B3L, 0x55FD3941L, 0xDA2547E6L, 0xABCA0A9AL, - 0x28507825L, 0x530429F4L, 0x0A2C86DAL, 0xE9B66DFBL, - 0x68DC1462L, 0xD7486900L, 0x680EC0A4L, 0x27A18DEEL, - 0x4F3FFEA2L, 0xE887AD8CL, 0xB58CE006L, 0x7AF4D6B6L, - 0xAACE1E7CL, 0xD3375FECL, 0xCE78A399L, 0x406B2A42L, - 0x20FE9E35L, 0xD9F385B9L, 0xEE39D7ABL, 0x3B124E8BL, - 0x1DC9FAF7L, 0x4B6D1856L, 0x26A36631L, 0xEAE397B2L, - 0x3A6EFA74L, 0xDD5B4332L, 0x6841E7F7L, 0xCA7820FBL, - 0xFB0AF54EL, 0xD8FEB397L, 0x454056ACL, 0xBA489527L, - 0x55533A3AL, 0x20838D87L, 0xFE6BA9B7L, 0xD096954BL, - 0x55A867BCL, 0xA1159A58L, 0xCCA92963L, 0x99E1DB33L, - 0xA62A4A56L, 0x3F3125F9L, 0x5EF47E1CL, 0x9029317CL, - 0xFDF8E802L, 0x04272F70L, 0x80BB155CL, 0x05282CE3L, - 0x95C11548L, 0xE4C66D22L, 0x48C1133FL, 0xC70F86DCL, - 0x07F9C9EEL, 0x41041F0FL, 0x404779A4L, 0x5D886E17L, - 0x325F51EBL, 0xD59BC0D1L, 0xF2BCC18FL, 0x41113564L, - 0x257B7834L, 0x602A9C60L, 0xDFF8E8A3L, 0x1F636C1BL, - 0x0E12B4C2L, 0x02E1329EL, 0xAF664FD1L, 0xCAD18115L, - 0x6B2395E0L, 0x333E92E1L, 0x3B240B62L, 0xEEBEB922L, - 0x85B2A20EL, 0xE6BA0D99L, 0xDE720C8CL, 0x2DA2F728L, - 0xD0127845L, 0x95B794FDL, 0x647D0862L, 0xE7CCF5F0L, - 0x5449A36FL, 0x877D48FAL, 0xC39DFD27L, 0xF33E8D1EL, - 0x0A476341L, 0x992EFF74L, 0x3A6F6EABL, 0xF4F8FD37L, - 0xA812DC60L, 0xA1EBDDF8L, 0x991BE14CL, 0xDB6E6B0DL, - 0xC67B5510L, 0x6D672C37L, 0x2765D43BL, 0xDCD0E804L, - 0xF1290DC7L, 0xCC00FFA3L, 0xB5390F92L, 0x690FED0BL, - 0x667B9FFBL, 0xCEDB7D9CL, 0xA091CF0BL, 0xD9155EA3L, - 0xBB132F88L, 0x515BAD24L, 0x7B9479BFL, 0x763BD6EBL, - 0x37392EB3L, 0xCC115979L, 0x8026E297L, 0xF42E312DL, - 0x6842ADA7L, 0xC66A2B3BL, 0x12754CCCL, 0x782EF11CL, - 0x6A124237L, 0xB79251E7L, 0x06A1BBE6L, 0x4BFB6350L, - 0x1A6B1018L, 0x11CAEDFAL, 0x3D25BDD8L, 0xE2E1C3C9L, - 0x44421659L, 0x0A121386L, 0xD90CEC6EL, 0xD5ABEA2AL, - 0x64AF674EL, 0xDA86A85FL, 0xBEBFE988L, 0x64E4C3FEL, - 0x9DBC8057L, 0xF0F7C086L, 0x60787BF8L, 0x6003604DL, - 0xD1FD8346L, 0xF6381FB0L, 0x7745AE04L, 0xD736FCCCL, - 0x83426B33L, 0xF01EAB71L, 0xB0804187L, 0x3C005E5FL, - 0x77A057BEL, 0xBDE8AE24L, 0x55464299L, 0xBF582E61L, - 0x4E58F48FL, 0xF2DDFDA2L, 0xF474EF38L, 0x8789BDC2L, - 0x5366F9C3L, 0xC8B38E74L, 0xB475F255L, 0x46FCD9B9L, - 0x7AEB2661L, 0x8B1DDF84L, 0x846A0E79L, 0x915F95E2L, - 0x466E598EL, 0x20B45770L, 0x8CD55591L, 0xC902DE4CL, - 0xB90BACE1L, 0xBB8205D0L, 0x11A86248L, 0x7574A99EL, - 0xB77F19B6L, 0xE0A9DC09L, 0x662D09A1L, 0xC4324633L, - 0xE85A1F02L, 0x09F0BE8CL, 0x4A99A025L, 0x1D6EFE10L, - 0x1AB93D1DL, 0x0BA5A4DFL, 0xA186F20FL, 0x2868F169L, - 0xDCB7DA83L, 0x573906FEL, 0xA1E2CE9BL, 0x4FCD7F52L, - 0x50115E01L, 0xA70683FAL, 0xA002B5C4L, 0x0DE6D027L, - 0x9AF88C27L, 0x773F8641L, 0xC3604C06L, 0x61A806B5L, - 0xF0177A28L, 0xC0F586E0L, 0x006058AAL, 0x30DC7D62L, - 0x11E69ED7L, 0x2338EA63L, 0x53C2DD94L, 0xC2C21634L, - 0xBBCBEE56L, 0x90BCB6DEL, 0xEBFC7DA1L, 0xCE591D76L, - 0x6F05E409L, 0x4B7C0188L, 0x39720A3DL, 0x7C927C24L, - 0x86E3725FL, 0x724D9DB9L, 0x1AC15BB4L, 0xD39EB8FCL, - 0xED545578L, 0x08FCA5B5L, 0xD83D7CD3L, 0x4DAD0FC4L, - 0x1E50EF5EL, 0xB161E6F8L, 0xA28514D9L, 0x6C51133CL, - 0x6FD5C7E7L, 0x56E14EC4L, 0x362ABFCEL, 0xDDC6C837L, - 0xD79A3234L, 0x92638212L, 0x670EFA8EL, 0x406000E0L }, - { 0x3A39CE37L, 0xD3FAF5CFL, 0xABC27737L, 0x5AC52D1BL, - 0x5CB0679EL, 0x4FA33742L, 0xD3822740L, 0x99BC9BBEL, - 0xD5118E9DL, 0xBF0F7315L, 0xD62D1C7EL, 0xC700C47BL, - 0xB78C1B6BL, 0x21A19045L, 0xB26EB1BEL, 0x6A366EB4L, - 0x5748AB2FL, 0xBC946E79L, 0xC6A376D2L, 0x6549C2C8L, - 0x530FF8EEL, 0x468DDE7DL, 0xD5730A1DL, 0x4CD04DC6L, - 0x2939BBDBL, 0xA9BA4650L, 0xAC9526E8L, 0xBE5EE304L, - 0xA1FAD5F0L, 0x6A2D519AL, 0x63EF8CE2L, 0x9A86EE22L, - 0xC089C2B8L, 0x43242EF6L, 0xA51E03AAL, 0x9CF2D0A4L, - 0x83C061BAL, 0x9BE96A4DL, 0x8FE51550L, 0xBA645BD6L, - 0x2826A2F9L, 0xA73A3AE1L, 0x4BA99586L, 0xEF5562E9L, - 0xC72FEFD3L, 0xF752F7DAL, 0x3F046F69L, 0x77FA0A59L, - 0x80E4A915L, 0x87B08601L, 0x9B09E6ADL, 0x3B3EE593L, - 0xE990FD5AL, 0x9E34D797L, 0x2CF0B7D9L, 0x022B8B51L, - 0x96D5AC3AL, 0x017DA67DL, 0xD1CF3ED6L, 0x7C7D2D28L, - 0x1F9F25CFL, 0xADF2B89BL, 0x5AD6B472L, 0x5A88F54CL, - 0xE029AC71L, 0xE019A5E6L, 0x47B0ACFDL, 0xED93FA9BL, - 0xE8D3C48DL, 0x283B57CCL, 0xF8D56629L, 0x79132E28L, - 0x785F0191L, 0xED756055L, 0xF7960E44L, 0xE3D35E8CL, - 0x15056DD4L, 0x88F46DBAL, 0x03A16125L, 0x0564F0BDL, - 0xC3EB9E15L, 0x3C9057A2L, 0x97271AECL, 0xA93A072AL, - 0x1B3F6D9BL, 0x1E6321F5L, 0xF59C66FBL, 0x26DCF319L, - 0x7533D928L, 0xB155FDF5L, 0x03563482L, 0x8ABA3CBBL, - 0x28517711L, 0xC20AD9F8L, 0xABCC5167L, 0xCCAD925FL, - 0x4DE81751L, 0x3830DC8EL, 0x379D5862L, 0x9320F991L, - 0xEA7A90C2L, 0xFB3E7BCEL, 0x5121CE64L, 0x774FBE32L, - 0xA8B6E37EL, 0xC3293D46L, 0x48DE5369L, 0x6413E680L, - 0xA2AE0810L, 0xDD6DB224L, 0x69852DFDL, 0x09072166L, - 0xB39A460AL, 0x6445C0DDL, 0x586CDECFL, 0x1C20C8AEL, - 0x5BBEF7DDL, 0x1B588D40L, 0xCCD2017FL, 0x6BB4E3BBL, - 0xDDA26A7EL, 0x3A59FF45L, 0x3E350A44L, 0xBCB4CDD5L, - 0x72EACEA8L, 0xFA6484BBL, 0x8D6612AEL, 0xBF3C6F47L, - 0xD29BE463L, 0x542F5D9EL, 0xAEC2771BL, 0xF64E6370L, - 0x740E0D8DL, 0xE75B1357L, 0xF8721671L, 0xAF537D5DL, - 0x4040CB08L, 0x4EB4E2CCL, 0x34D2466AL, 0x0115AF84L, - 0xE1B00428L, 0x95983A1DL, 0x06B89FB4L, 0xCE6EA048L, - 0x6F3F3B82L, 0x3520AB82L, 0x011A1D4BL, 0x277227F8L, - 0x611560B1L, 0xE7933FDCL, 0xBB3A792BL, 0x344525BDL, - 0xA08839E1L, 0x51CE794BL, 0x2F32C9B7L, 0xA01FBAC9L, - 0xE01CC87EL, 0xBCC7D1F6L, 0xCF0111C3L, 0xA1E8AAC7L, - 0x1A908749L, 0xD44FBD9AL, 0xD0DADECBL, 0xD50ADA38L, - 0x0339C32AL, 0xC6913667L, 0x8DF9317CL, 0xE0B12B4FL, - 0xF79E59B7L, 0x43F5BB3AL, 0xF2D519FFL, 0x27D9459CL, - 0xBF97222CL, 0x15E6FC2AL, 0x0F91FC71L, 0x9B941525L, - 0xFAE59361L, 0xCEB69CEBL, 0xC2A86459L, 0x12BAA8D1L, - 0xB6C1075EL, 0xE3056A0CL, 0x10D25065L, 0xCB03A442L, - 0xE0EC6E0EL, 0x1698DB3BL, 0x4C98A0BEL, 0x3278E964L, - 0x9F1F9532L, 0xE0D392DFL, 0xD3A0342BL, 0x8971F21EL, - 0x1B0A7441L, 0x4BA3348CL, 0xC5BE7120L, 0xC37632D8L, - 0xDF359F8DL, 0x9B992F2EL, 0xE60B6F47L, 0x0FE3F11DL, - 0xE54CDA54L, 0x1EDAD891L, 0xCE6279CFL, 0xCD3E7E6FL, - 0x1618B166L, 0xFD2C1D05L, 0x848FD2C5L, 0xF6FB2299L, - 0xF523F357L, 0xA6327623L, 0x93A83531L, 0x56CCCD02L, - 0xACF08162L, 0x5A75EBB5L, 0x6E163697L, 0x88D273CCL, - 0xDE966292L, 0x81B949D0L, 0x4C50901BL, 0x71C65614L, - 0xE6C6C7BDL, 0x327A140AL, 0x45E1D006L, 0xC3F27B9AL, - 0xC9AA53FDL, 0x62A80F00L, 0xBB25BFE2L, 0x35BDD2F6L, - 0x71126905L, 0xB2040222L, 0xB6CBCF7CL, 0xCD769C2BL, - 0x53113EC0L, 0x1640E3D3L, 0x38ABBD60L, 0x2547ADF0L, - 0xBA38209CL, 0xF746CE76L, 0x77AFA1C5L, 0x20756060L, - 0x85CBFE4EL, 0x8AE88DD8L, 0x7AAAF9B0L, 0x4CF9AA7EL, - 0x1948C25CL, 0x02FB8A8CL, 0x01C36AE4L, 0xD6EBE1F9L, - 0x90D4F869L, 0xA65CDEA0L, 0x3F09252DL, 0xC208E69FL, - 0xB74E6132L, 0xCE77E25BL, 0x578FDFE3L, 0x3AC372E6L } -}; #endif /* !MBEDTLS_BLOWFISH_ALT */ #endif /* MBEDTLS_BLOWFISH_C */ diff --git a/deps/mbedtls/cipher_wrap.c b/deps/mbedtls/cipher_wrap.c index dc76af8ff4..dabc7a25d4 100644 --- a/deps/mbedtls/cipher_wrap.c +++ b/deps/mbedtls/cipher_wrap.c @@ -87,8 +87,8 @@ static void *gcm_ctx_alloc( void ) static void gcm_ctx_free( void *ctx ) { - mbedtls_gcm_free( ctx ); - mbedtls_free( ctx ); + mbedtls_gcm_free((mbedtls_gcm_context*)ctx); + mbedtls_free(ctx); } #endif /* MBEDTLS_GCM_C */ @@ -106,7 +106,7 @@ static void *ccm_ctx_alloc( void ) static void ccm_ctx_free( void *ctx ) { - mbedtls_ccm_free( ctx ); + mbedtls_ccm_free((mbedtls_ccm_context*)ctx); mbedtls_free( ctx ); } #endif /* MBEDTLS_CCM_C */ @@ -162,7 +162,7 @@ static int aes_setkey_enc_wrap( void *ctx, const unsigned char *key, static void * aes_ctx_alloc( void ) { - mbedtls_aes_context *aes = mbedtls_calloc( 1, sizeof( mbedtls_aes_context ) ); + mbedtls_aes_context *aes = (mbedtls_aes_context*)mbedtls_calloc( 1, sizeof( mbedtls_aes_context ) ); if( aes == NULL ) return( NULL ); @@ -518,8 +518,8 @@ static int camellia_setkey_enc_wrap( void *ctx, const unsigned char *key, static void * camellia_ctx_alloc( void ) { - mbedtls_camellia_context *ctx; - ctx = mbedtls_calloc( 1, sizeof( mbedtls_camellia_context ) ); + mbedtls_camellia_context *ctx = (mbedtls_camellia_context*) + mbedtls_calloc( 1, sizeof( mbedtls_camellia_context ) ); if( ctx == NULL ) return( NULL ); @@ -906,7 +906,8 @@ static int des3_set3key_enc_wrap( void *ctx, const unsigned char *key, static void * des_ctx_alloc( void ) { - mbedtls_des_context *des = mbedtls_calloc( 1, sizeof( mbedtls_des_context ) ); + mbedtls_des_context *des = (mbedtls_des_context*) + mbedtls_calloc( 1, sizeof( mbedtls_des_context ) ); if( des == NULL ) return( NULL ); @@ -924,8 +925,7 @@ static void des_ctx_free( void *ctx ) static void * des3_ctx_alloc( void ) { - mbedtls_des3_context *des3; - des3 = mbedtls_calloc( 1, sizeof( mbedtls_des3_context ) ); + mbedtls_des3_context *des3 = (mbedtls_des3_context*)mbedtls_calloc( 1, sizeof( mbedtls_des3_context ) ); if( des3 == NULL ) return( NULL ); @@ -1123,8 +1123,7 @@ static int blowfish_setkey_wrap( void *ctx, const unsigned char *key, static void * blowfish_ctx_alloc( void ) { - mbedtls_blowfish_context *ctx; - ctx = mbedtls_calloc( 1, sizeof( mbedtls_blowfish_context ) ); + mbedtls_blowfish_context *ctx = (mbedtls_blowfish_context*)mbedtls_calloc( 1, sizeof( mbedtls_blowfish_context ) ); if( ctx == NULL ) return( NULL ); @@ -1233,8 +1232,7 @@ static int arc4_setkey_wrap( void *ctx, const unsigned char *key, static void * arc4_ctx_alloc( void ) { - mbedtls_arc4_context *ctx; - ctx = mbedtls_calloc( 1, sizeof( mbedtls_arc4_context ) ); + mbedtls_arc4_context *ctx = (mbedtls_arc4_context*)mbedtls_calloc( 1, sizeof( mbedtls_arc4_context ) ); if( ctx == NULL ) return( NULL ); diff --git a/deps/mbedtls/hmac_drbg.c b/deps/mbedtls/hmac_drbg.c index a32052b724..a8ed885c82 100644 --- a/deps/mbedtls/hmac_drbg.c +++ b/deps/mbedtls/hmac_drbg.c @@ -447,7 +447,7 @@ static size_t test_offset; static int hmac_drbg_self_test_entropy( void *data, unsigned char *buf, size_t len ) { - const unsigned char *p = data; + const unsigned char *p = (const unsigned char*)data; memcpy( buf, p + test_offset, len ); test_offset += len; return( 0 ); diff --git a/deps/mbedtls/pem.c b/deps/mbedtls/pem.c index 37e857e92c..2995d7fd70 100644 --- a/deps/mbedtls/pem.c +++ b/deps/mbedtls/pem.c @@ -323,7 +323,7 @@ int mbedtls_pem_read_buffer( mbedtls_pem_context *ctx, const char *header, const if( ret == MBEDTLS_ERR_BASE64_INVALID_CHARACTER ) return( MBEDTLS_ERR_PEM_INVALID_DATA + ret ); - if( ( buf = mbedtls_calloc( 1, len ) ) == NULL ) + if( ( buf = (unsigned char*)mbedtls_calloc( 1, len ) ) == NULL ) return( MBEDTLS_ERR_PEM_ALLOC_FAILED ); if( ( ret = mbedtls_base64_decode( buf, len, &len, s1, s2 - s1 ) ) != 0 ) @@ -409,7 +409,7 @@ int mbedtls_pem_write_buffer( const char *header, const char *footer, return( MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL ); } - if( ( encode_buf = mbedtls_calloc( 1, use_len ) ) == NULL ) + if( ( encode_buf = (unsigned char*)mbedtls_calloc( 1, use_len ) ) == NULL ) return( MBEDTLS_ERR_PEM_ALLOC_FAILED ); if( ( ret = mbedtls_base64_encode( encode_buf, use_len, &use_len, der_data, diff --git a/deps/mbedtls/ssl_tls.c b/deps/mbedtls/ssl_tls.c index e417d1915a..6c136351c9 100644 --- a/deps/mbedtls/ssl_tls.c +++ b/deps/mbedtls/ssl_tls.c @@ -163,7 +163,7 @@ static int ssl_session_copy( mbedtls_ssl_session *dst, const mbedtls_ssl_session { int ret; - dst->peer_cert = mbedtls_calloc( 1, sizeof(mbedtls_x509_crt) ); + dst->peer_cert = (mbedtls_x509_crt*)mbedtls_calloc( 1, sizeof(mbedtls_x509_crt) ); if( dst->peer_cert == NULL ) return( MBEDTLS_ERR_SSL_ALLOC_FAILED ); @@ -182,7 +182,7 @@ static int ssl_session_copy( mbedtls_ssl_session *dst, const mbedtls_ssl_session #if defined(MBEDTLS_SSL_SESSION_TICKETS) && defined(MBEDTLS_SSL_CLI_C) if( src->ticket != NULL ) { - dst->ticket = mbedtls_calloc( 1, src->ticket_len ); + dst->ticket = (unsigned char*)mbedtls_calloc( 1, src->ticket_len ); if( dst->ticket == NULL ) return( MBEDTLS_ERR_SSL_ALLOC_FAILED ); @@ -2471,14 +2471,15 @@ static int ssl_flight_append( mbedtls_ssl_context *ssl ) mbedtls_ssl_flight_item *msg; /* Allocate space for current message */ - if( ( msg = mbedtls_calloc( 1, sizeof( mbedtls_ssl_flight_item ) ) ) == NULL ) + if( ( msg = (mbedtls_ssl_flight_item*) + mbedtls_calloc( 1, sizeof( mbedtls_ssl_flight_item ) ) ) == NULL ) { MBEDTLS_SSL_DEBUG_MSG( 1, ( "alloc %d bytes failed", sizeof( mbedtls_ssl_flight_item ) ) ); return( MBEDTLS_ERR_SSL_ALLOC_FAILED ); } - if( ( msg->p = mbedtls_calloc( 1, ssl->out_msglen ) ) == NULL ) + if( ( msg->p = (unsigned char*)mbedtls_calloc( 1, ssl->out_msglen ) ) == NULL ) { MBEDTLS_SSL_DEBUG_MSG( 1, ( "alloc %d bytes failed", ssl->out_msglen ) ); mbedtls_free( msg ); @@ -2950,7 +2951,7 @@ static int ssl_reassemble_dtls_handshake( mbedtls_ssl_context *ssl ) /* The bitmask needs one bit per byte of message excluding header */ alloc_len = 12 + msg_len + msg_len / 8 + ( msg_len % 8 != 0 ); - ssl->handshake->hs_msg = mbedtls_calloc( 1, alloc_len ); + ssl->handshake->hs_msg = (unsigned char*)mbedtls_calloc( 1, alloc_len ); if( ssl->handshake->hs_msg == NULL ) { MBEDTLS_SSL_DEBUG_MSG( 1, ( "alloc failed (%d bytes)", alloc_len ) ); @@ -4453,7 +4454,7 @@ int mbedtls_ssl_parse_certificate( mbedtls_ssl_context *ssl ) mbedtls_free( ssl->session_negotiate->peer_cert ); } - if( ( ssl->session_negotiate->peer_cert = mbedtls_calloc( 1, + if( ( ssl->session_negotiate->peer_cert = (mbedtls_x509_crt*)mbedtls_calloc( 1, sizeof( mbedtls_x509_crt ) ) ) == NULL ) { MBEDTLS_SSL_DEBUG_MSG( 1, ( "alloc(%d bytes) failed", @@ -5506,17 +5507,17 @@ static int ssl_handshake_init( mbedtls_ssl_context *ssl ) */ if( ssl->transform_negotiate == NULL ) { - ssl->transform_negotiate = mbedtls_calloc( 1, sizeof(mbedtls_ssl_transform) ); + ssl->transform_negotiate = (mbedtls_ssl_transform*)mbedtls_calloc( 1, sizeof(mbedtls_ssl_transform) ); } if( ssl->session_negotiate == NULL ) { - ssl->session_negotiate = mbedtls_calloc( 1, sizeof(mbedtls_ssl_session) ); + ssl->session_negotiate = (mbedtls_ssl_session*)mbedtls_calloc( 1, sizeof(mbedtls_ssl_session) ); } if( ssl->handshake == NULL ) { - ssl->handshake = mbedtls_calloc( 1, sizeof(mbedtls_ssl_handshake_params) ); + ssl->handshake = (mbedtls_ssl_handshake_params*)mbedtls_calloc( 1, sizeof(mbedtls_ssl_handshake_params) ); } /* All pointers should exist and can be directly freed without issue */ @@ -5610,8 +5611,8 @@ int mbedtls_ssl_setup( mbedtls_ssl_context *ssl, /* * Prepare base structures */ - if( ( ssl-> in_buf = mbedtls_calloc( 1, len ) ) == NULL || - ( ssl->out_buf = mbedtls_calloc( 1, len ) ) == NULL ) + if( ( ssl-> in_buf = (unsigned char*)mbedtls_calloc( 1, len ) ) == NULL || + ( ssl->out_buf = (unsigned char*)mbedtls_calloc( 1, len ) ) == NULL ) { MBEDTLS_SSL_DEBUG_MSG( 1, ( "alloc(%d bytes) failed", len ) ); mbedtls_free( ssl->in_buf ); @@ -5936,27 +5937,26 @@ static int ssl_append_key_cert( mbedtls_ssl_key_cert **head, mbedtls_x509_crt *cert, mbedtls_pk_context *key ) { - mbedtls_ssl_key_cert *new; - - new = mbedtls_calloc( 1, sizeof( mbedtls_ssl_key_cert ) ); - if( new == NULL ) + mbedtls_ssl_key_cert *keycert = (mbedtls_ssl_key_cert*) + mbedtls_calloc( 1, sizeof( mbedtls_ssl_key_cert ) ); + if( keycert == NULL ) return( MBEDTLS_ERR_SSL_ALLOC_FAILED ); - new->cert = cert; - new->key = key; - new->next = NULL; + keycert->cert = cert; + keycert->key = key; + keycert->next = NULL; /* Update head is the list was null, else add to the end */ if( *head == NULL ) { - *head = new; + *head = keycert; } else { mbedtls_ssl_key_cert *cur = *head; while( cur->next != NULL ) cur = cur->next; - cur->next = new; + cur->next = keycert; } return( 0 ); @@ -6054,8 +6054,8 @@ int mbedtls_ssl_conf_psk( mbedtls_ssl_config *conf, conf->psk_identity = NULL; } - if( ( conf->psk = mbedtls_calloc( 1, psk_len ) ) == NULL || - ( conf->psk_identity = mbedtls_calloc( 1, psk_identity_len ) ) == NULL ) + if( ( conf->psk = (unsigned char*)mbedtls_calloc( 1, psk_len ) ) == NULL || + ( conf->psk_identity = (unsigned char*)mbedtls_calloc( 1, psk_identity_len ) ) == NULL ) { mbedtls_free( conf->psk ); mbedtls_free( conf->psk_identity ); @@ -6085,7 +6085,8 @@ int mbedtls_ssl_set_hs_psk( mbedtls_ssl_context *ssl, if( ssl->handshake->psk != NULL ) mbedtls_free( ssl->handshake->psk ); - if( ( ssl->handshake->psk = mbedtls_calloc( 1, psk_len ) ) == NULL ) + if( ( ssl->handshake->psk = (unsigned char*) + mbedtls_calloc( 1, psk_len ) ) == NULL ) return( MBEDTLS_ERR_SSL_ALLOC_FAILED ); ssl->handshake->psk_len = psk_len; @@ -6185,7 +6186,7 @@ int mbedtls_ssl_set_hostname( mbedtls_ssl_context *ssl, const char *hostname ) if( hostname_len > MBEDTLS_SSL_MAX_HOST_NAME_LEN ) return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - ssl->hostname = mbedtls_calloc( 1, hostname_len + 1 ); + ssl->hostname = (char*)mbedtls_calloc( 1, hostname_len + 1 ); if( ssl->hostname == NULL ) return( MBEDTLS_ERR_SSL_ALLOC_FAILED ); diff --git a/gfx/common/gdi_common.h b/gfx/common/gdi_common.h index 0f0b971018..ddb33b3fb3 100644 --- a/gfx/common/gdi_common.h +++ b/gfx/common/gdi_common.h @@ -27,6 +27,7 @@ typedef struct gdi #endif HDC winDC; HDC memDC; + HDC texDC; HBITMAP bmp; HBITMAP bmp_old; unsigned video_width; @@ -35,4 +36,17 @@ typedef struct gdi unsigned screen_height; } gdi_t; +typedef struct gdi_texture +{ + int width; + int height; + int active_width; + int active_height; + + enum texture_filter_type type; + void* data; + HBITMAP bmp; + HBITMAP bmp_old; +} gdi_texture_t; + #endif diff --git a/gfx/common/win32_common.c b/gfx/common/win32_common.c index 69f82746f6..b580a1bcb0 100644 --- a/gfx/common/win32_common.c +++ b/gfx/common/win32_common.c @@ -837,18 +837,18 @@ LRESULT CALLBACK WndProcGDI(HWND hwnd, UINT message, /* draw menu contents behind a gradient background */ if (gdi && gdi->memDC) { - RECT rect; + /*RECT rect; HBRUSH brush = CreateSolidBrush(RGB(1,81,127)); - GetClientRect(hwnd, &rect); + GetClientRect(hwnd, &rect);*/ StretchBlt(gdi->winDC, 0, 0, gdi->screen_width, gdi->screen_height, gdi->memDC, 0, 0, gdi->video_width, gdi->video_height, SRCCOPY); - FillRect(gdi->memDC, &rect, brush); - DeleteObject(brush); + /*FillRect(gdi->memDC, &rect, brush); + DeleteObject(brush);*/ } } else diff --git a/gfx/drivers/gdi_gfx.c b/gfx/drivers/gdi_gfx.c index dae5a1b091..6b820c1e18 100644 --- a/gfx/drivers/gdi_gfx.c +++ b/gfx/drivers/gdi_gfx.c @@ -16,6 +16,7 @@ */ #include +#include #ifdef HAVE_CONFIG_H #include "../../config.h" @@ -192,6 +193,9 @@ static bool gdi_gfx_frame(void *data, const void *frame, HWND hwnd = win32_get_window(); BITMAPINFO *info; + /* FIXME */ + video_info->xmb_shadows_enable = false; + if (!frame || !frame_width || !frame_height) return true; @@ -414,9 +418,16 @@ static void gdi_gfx_free(void *data) if (!gdi) return; + if (gdi->bmp) + DeleteObject(gdi->bmp); + + if (gdi->texDC) + { + DeleteDC(gdi->texDC); + gdi->texDC = 0; + } if (gdi->memDC) { - DeleteObject(gdi->bmp); DeleteDC(gdi->memDC); gdi->memDC = 0; } @@ -532,12 +543,61 @@ static void gdi_set_video_mode(void *data, unsigned width, unsigned height, video_context_driver_set_video_mode(&mode); } +static uintptr_t gdi_load_texture(void *video_data, void *data, + bool threaded, enum texture_filter_type filter_type) +{ + struct texture_image *image = (struct texture_image*)data; + int size = image->width * image->height * sizeof(uint32_t); + gdi_texture_t *texture = NULL; + void *tmpdata = NULL; + + if (!image || image->width > 2048 || image->height > 2048) + return 0; + + texture = calloc(1, sizeof(*texture)); + texture->width = image->width; + texture->height = image->height; + texture->active_width = image->width; + texture->active_height = image->height; + texture->data = calloc(1, texture->width * texture->height * sizeof(uint32_t)); + texture->type = filter_type; + + if (!texture->data) + { + free(texture); + return 0; + } + + memcpy(texture->data, image->pixels, texture->width * texture->height * sizeof(uint32_t)); + + return (uintptr_t)texture; +} + +static void gdi_unload_texture(void *data, uintptr_t handle) +{ + struct gdi_texture *texture = (struct gdi_texture*)handle; + + if (!texture) + return; + + if (texture->data) + free(texture->data); + + if (texture->bmp) + { + DeleteObject(texture->bmp); + texture->bmp = NULL; + } + + free(texture); +} + static const video_poke_interface_t gdi_poke_interface = { NULL, /* get_flags */ NULL, /* set_coords */ NULL, /* set_mvp */ - NULL, - NULL, + gdi_load_texture, + gdi_unload_texture, gdi_set_video_mode, win32_get_refresh_rate, NULL, diff --git a/gfx/drivers/gl.c b/gfx/drivers/gl.c index aa0f52dba7..09c6e826f0 100644 --- a/gfx/drivers/gl.c +++ b/gfx/drivers/gl.c @@ -364,10 +364,11 @@ static void gl_set_viewport_wrapper(void *data, unsigned viewport_width, unsigned viewport_height, bool force_full, bool allow_rotate) { video_frame_info_t video_info; + gl_t *gl = (gl_t*)data; video_driver_build_info(&video_info); - gl_set_viewport(data, &video_info, + gl_set_viewport(gl, &video_info, viewport_width, viewport_height, force_full, allow_rotate); } diff --git a/gfx/drivers_font/gdi_font.c b/gfx/drivers_font/gdi_font.c index 1c37ddd5ed..2cb7e0e981 100644 --- a/gfx/drivers_font/gdi_font.c +++ b/gfx/drivers_font/gdi_font.c @@ -18,6 +18,7 @@ #include #include #include +#include #ifdef HAVE_CONFIG_H #include "../../config.h" @@ -85,65 +86,113 @@ static void gdi_render_msg( void *data, const char *msg, const struct font_params *params) { - float x, y, scale; - unsigned newX, newY, len; + float x, y, scale, drop_mod, alpha, drop_alpha; + int drop_x, drop_y, msg_strlen; + unsigned i; + unsigned newX, newY, newDropX, newDropY; unsigned align; - unsigned red; - unsigned green; - unsigned blue; + unsigned red, green, blue; + unsigned drop_red, drop_green, drop_blue; gdi_raster_t *font = (gdi_raster_t*)data; unsigned width = video_info->width; unsigned height = video_info->height; + SIZE textSize = {0}; + struct string_list *msg_list = NULL; if (!font || string_is_empty(msg) || !font->gdi) return; if (params) { - x = params->x; - y = params->y; - scale = params->scale; - align = params->text_align; + x = params->x; + y = params->y; + drop_x = params->drop_x; + drop_y = params->drop_y; + drop_mod = params->drop_mod; + drop_alpha = params->drop_alpha; + scale = params->scale; + align = params->text_align; - red = FONT_COLOR_GET_RED(params->color); - green = FONT_COLOR_GET_GREEN(params->color); - blue = FONT_COLOR_GET_BLUE(params->color); + red = FONT_COLOR_GET_RED(params->color); + green = FONT_COLOR_GET_GREEN(params->color); + blue = FONT_COLOR_GET_BLUE(params->color); + alpha = FONT_COLOR_GET_ALPHA(params->color); } else { - x = video_info->font_msg_pos_x; - y = video_info->font_msg_pos_y; - scale = 1.0f; - align = TEXT_ALIGN_LEFT; - red = video_info->font_msg_color_r * 255.0f; - green = video_info->font_msg_color_g * 255.0f; - blue = video_info->font_msg_color_b * 255.0f; + x = video_info->font_msg_pos_x; + y = video_info->font_msg_pos_y; + drop_x = -2; + drop_y = -2; + drop_mod = 0.3f; + drop_alpha = 1.0f; + scale = 1.0f; + align = TEXT_ALIGN_LEFT; + red = video_info->font_msg_color_r * 255.0f; + green = video_info->font_msg_color_g * 255.0f; + blue = video_info->font_msg_color_b * 255.0f; + alpha = 255; } - len = utf8len(msg); + msg_strlen = strlen(msg); + + GetTextExtentPoint32(font->gdi->memDC, msg, msg_strlen, &textSize); switch (align) { case TEXT_ALIGN_LEFT: newX = x * width * scale; + newDropX = drop_x * width * scale; break; case TEXT_ALIGN_RIGHT: - newX = (x * width * scale) - len; + newX = (x * width * scale) - textSize.cx; + newDropX = (drop_x * width * scale) - textSize.cx; break; case TEXT_ALIGN_CENTER: - newX = (x * width * scale) - (len / 2); + newX = (x * width * scale) - (textSize.cx / 2); + newDropX = (drop_x * width * scale) - (textSize.cx / 2); break; default: newX = 0; + newDropX = 0; break; } - newY = height - (y * height * scale); + newY = height - (y * height * scale) - textSize.cy; + newDropY = height - (drop_y * height * scale) - textSize.cy; font->gdi->bmp_old = (HBITMAP)SelectObject(font->gdi->memDC, font->gdi->bmp); + SetBkMode(font->gdi->memDC, TRANSPARENT); + + msg_list = string_split(msg, "\n"); + + if (drop_x || drop_y) + { + float dark_alpha = drop_alpha; + drop_red = red * drop_mod * dark_alpha; + drop_green = green * drop_mod * dark_alpha; + drop_blue = blue * drop_mod * dark_alpha; + + SetTextColor(font->gdi->memDC, RGB(drop_red, drop_green, drop_blue)); + + if (msg_list) + { + for (i = 0; i < msg_list->size; i++) + TextOut(font->gdi->memDC, newDropX, newDropY + (textSize.cy * i), msg_list->elems[i].data, utf8len(msg_list->elems[i].data)); + } + } + SetTextColor(font->gdi->memDC, RGB(red, green, blue)); - TextOut(font->gdi->memDC, newX, newY, msg, len); + + if (msg_list) + { + for (i = 0; i < msg_list->size; i++) + TextOut(font->gdi->memDC, newX, newY + (textSize.cy * i), msg_list->elems[i].data, utf8len(msg_list->elems[i].data)); + + string_list_free(msg_list); + } + SelectObject(font->gdi->memDC, font->gdi->bmp_old); } diff --git a/intl/msg_hash_chs.h b/intl/msg_hash_chs.h index 27e26619c4..cedf839410 100644 --- a/intl/msg_hash_chs.h +++ b/intl/msg_hash_chs.h @@ -188,7 +188,7 @@ MSG_HASH( "Cheevos 账户设置" /*FIXME:"Accounts Cheevos"*/ /*Should be fixed now, not sure though*/ ) MSG_HASH( - MENU_ENUM_LABEL_VALUE_ACCOUNTS_CHEEVOS_USERNAME, + MENU_ENUM_LABEL_VALUE_ACCOUNTS_CHEEVOS_USERNAME, "用户名" ) MSG_HASH( @@ -302,7 +302,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUTOSAVE_INTERVAL, - "SaveRAM自动保存间隔" + "游戏存档自动保存间隔" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUTO_OVERRIDES_ENABLE, @@ -444,9 +444,17 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_HARDCORE_MODE_ENABLE, "专家模式" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEEVOS_LEADERBOARDS_ENABLE, + "排行榜" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEEVOS_BADGES_ENABLE, + "成就奖章" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_LOCKED_ACHIEVEMENTS, - "已解锁的成就:" + "已解锁的成就:" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_LOCKED_ENTRY, @@ -468,6 +476,18 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_UNLOCKED_ENTRY, "未锁定" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEEVOS_UNLOCKED_ENTRY_HARDCORE, + "硬核" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEEVOS_VERBOSE_ENABLE, + "详细模式" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEEVOS_AUTO_SCREENSHOT, + "自动截屏" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CLOSE_CONTENT, "关闭" @@ -578,7 +598,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_DATABASE_SELECTION, MSG_HASH(MENU_ENUM_LABEL_VALUE_DELETE_ENTRY, "移除") MSG_HASH(MENU_ENUM_LABEL_VALUE_FAVORITES, - "选择文件并探测核心") /* TODO/FIXME - update */ + "选择文件并选择核心") /* TODO/FIXME - update */ MSG_HASH(MENU_ENUM_LABEL_VALUE_DIRECTORY_CONTENT, "<游戏内容文件夹>") MSG_HASH(MENU_ENUM_LABEL_VALUE_DIRECTORY_DEFAULT, @@ -598,7 +618,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_DISK_INDEX, MSG_HASH(MENU_ENUM_LABEL_VALUE_DISK_OPTIONS, "光盘控制") MSG_HASH(MENU_ENUM_LABEL_VALUE_DONT_CARE, - "不关心") + "自动") MSG_HASH(MENU_ENUM_LABEL_VALUE_DOWNLOADED_FILE_DETECT_CORE_LIST, "下载文件夹") MSG_HASH(MENU_ENUM_LABEL_VALUE_DOWNLOAD_CORE, @@ -633,6 +653,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_FPS_SHOW, "显示帧率") MSG_HASH(MENU_ENUM_LABEL_VALUE_FRAME_THROTTLE_ENABLE, "限制最大运行速度") +MSG_HASH(MENU_ENUM_LABEL_VALUE_VRR_RUNLOOP_ENABLE, + "精确同步游戏帧数 (G-Sync, FreeSync)") MSG_HASH(MENU_ENUM_LABEL_VALUE_FRAME_THROTTLE_SETTINGS, "帧率限制") MSG_HASH(MENU_ENUM_LABEL_VALUE_FRONTEND_COUNTERS, @@ -879,6 +901,10 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_OVERLAY_ENABLE, "显示图层") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_OVERLAY_HIDE_IN_MENU, "在菜单中隐藏图层") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_OVERLAY_SHOW_PHYSICAL_INPUTS, + "在图层上显示控制器") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_OVERLAY_SHOW_PHYSICAL_INPUTS_PORT, + "显示控制器所在图层编号") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_POLL_TYPE_BEHAVIOR, "轮询类型行为") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_POLL_TYPE_BEHAVIOR_EARLY, @@ -902,9 +928,9 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_SMALL_KEYBOARD_ENABLE, MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_TOUCH_ENABLE, "启用触摸") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_TURBO_ENABLE, - "TURBO开关") + "连发开关") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_TURBO_PERIOD, - "Turbo区间") + "连发按键频率") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_USER_BINDS, "输入用户 %u 的绑定") MSG_HASH(MENU_ENUM_LABEL_VALUE_LATENCY_SETTINGS, @@ -1009,6 +1035,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS, /* TODO/FIXME - updat "菜单文件浏览器") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_LINEAR_FILTER, "菜单线性过滤") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_HORIZONTAL_ANIMATION, + "水平动画") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SETTINGS, "菜单") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER, @@ -1033,8 +1061,14 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_NEAREST, "最近") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY, "在线游戏") +MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_ALLOW_SLAVES, + "允许从属模式客户端") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_CHECK_FRAMES, "在线游戏检查帧数") +MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_INPUT_LATENCY_FRAMES_MIN, + "输入延迟帧") +MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_INPUT_LATENCY_FRAMES_RANGE, + "输入延迟帧范围") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_DELAY_FRAMES, "在线游戏延迟帧数") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_DISCONNECT, @@ -1057,18 +1091,60 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_NICKNAME, "用户名") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_PASSWORD, "服务器密码") +MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_PUBLIC_ANNOUNCE, + "启用公共的在线游戏网络") +MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_REQUIRE_SLAVES, + "只允许从属模式客户端") +MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_REQUEST_DEVICE_I, + "请求设备 %u") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_SETTINGS, "在线游戏设置") +MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_SHARE_ANALOG, + "模拟输入分配") +MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_SHARE_ANALOG_MAX, + "最大") +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NETPLAY_SHARE_ANALOG_AVERAGE, + "平均" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NETPLAY_SHARE_DIGITAL, + "数字输入分配" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NETPLAY_SHARE_DIGITAL_OR, + "共用" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NETPLAY_SHARE_DIGITAL_XOR, + "Grapple" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NETPLAY_SHARE_DIGITAL_VOTE, + "Vote" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NETPLAY_SHARE_NONE, + "无" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NETPLAY_SHARE_NO_PREFERENCE, + "不设置" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NETPLAY_START_AS_SPECTATOR, + "在线游戏旁观者模式" + ) MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_STATELESS_MODE, "联机无状态模式") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_SPECTATE_PASSWORD, - "服务器围观的密码") + "服务器观战的密码") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_SPECTATOR_MODE_ENABLE, "启用在线游戏旁观者") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_TCP_UDP_PORT, - "在线游戏TCP/UDP端口") + "在线游戏 TCP/UDP 端口") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_NAT_TRAVERSAL, - "联机NAT遍历") + "联机 NAT 遍历") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETWORK_CMD_ENABLE, "网络命令") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETWORK_CMD_PORT, @@ -1118,7 +1194,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_NO_PLAYLIST_ENTRIES_AVAILABLE, MSG_HASH(MENU_ENUM_LABEL_VALUE_NO_SETTINGS_FOUND, "没有找到设置。") MSG_HASH(MENU_ENUM_LABEL_VALUE_NO_SHADER_PARAMETERS, - "没有渲染器参数.") + "没有渲染器参数。") MSG_HASH(MENU_ENUM_LABEL_VALUE_OFF, "关") MSG_HASH(MENU_ENUM_LABEL_VALUE_ON, @@ -1132,7 +1208,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_ONSCREEN_DISPLAY_SETTINGS, MSG_HASH(MENU_ENUM_LABEL_VALUE_ONSCREEN_OVERLAY_SETTINGS, "屏幕图层") MSG_HASH(MENU_ENUM_SUBLABEL_ONSCREEN_OVERLAY_SETTINGS, - "Adjust Bezels and Onscreen controls") + "调整边框和屏幕图层按键显示") MSG_HASH(MENU_ENUM_LABEL_VALUE_ONSCREEN_NOTIFICATIONS_SETTINGS, "屏幕提示") MSG_HASH(MENU_ENUM_SUBLABEL_ONSCREEN_NOTIFICATIONS_SETTINGS, @@ -1158,7 +1234,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_OVERLAY_SCALE, MSG_HASH(MENU_ENUM_LABEL_VALUE_OVERLAY_SETTINGS, "屏幕图层") MSG_HASH(MENU_ENUM_LABEL_VALUE_PAL60_ENABLE, - "使用PAL60模式") + "使用 PAL60 模式") MSG_HASH(MENU_ENUM_LABEL_VALUE_PARENT_DIRECTORY, "上一级文件夹") MSG_HASH(MENU_ENUM_LABEL_VALUE_PAUSE_LIBRETRO, @@ -1181,6 +1257,10 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_PRESENT, "现在") MSG_HASH(MENU_ENUM_LABEL_VALUE_PRIVACY_SETTINGS, "隐私") +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MIDI_SETTINGS, + "MIDI 设置" + ) MSG_HASH(MENU_ENUM_LABEL_VALUE_QUIT_RETROARCH, "退出 RetroArch") MSG_HASH(MENU_ENUM_LABEL_VALUE_RDB_ENTRY_ANALOG, @@ -1296,6 +1376,14 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_REWIND_ENABLE, "启用回溯") MSG_HASH(MENU_ENUM_LABEL_VALUE_REWIND_GRANULARITY, "回溯粒度") +MSG_HASH( + MENU_ENUM_LABEL_VALUE_REWIND_BUFFER_SIZE, + "回溯缓冲区大小 (MB)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_REWIND_BUFFER_SIZE_STEP, + "回溯缓冲区大小步长 (MB)" + ) MSG_HASH(MENU_ENUM_LABEL_VALUE_REWIND_SETTINGS, "回溯") MSG_HASH(MENU_ENUM_LABEL_VALUE_RGUI_BROWSER_DIRECTORY, @@ -1329,7 +1417,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_SAVE, MSG_HASH(MENU_ENUM_LABEL_VALUE_SAVESTATE_DIRECTORY, "即时存档文件夹") MSG_HASH(MENU_ENUM_LABEL_VALUE_SAVESTATE_THUMBNAIL_ENABLE, - "Savestate Thumbnails") + "即时存档缩略图") MSG_HASH(MENU_ENUM_LABEL_VALUE_SAVE_CURRENT_CONFIG, "保存当前配置") MSG_HASH(MENU_ENUM_LABEL_VALUE_SAVE_CURRENT_CONFIG_OVERRIDE_CORE, @@ -1369,13 +1457,13 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_SHADER_APPLY_CHANGES, MSG_HASH(MENU_ENUM_LABEL_VALUE_SHADER_OPTIONS, "渲染器效果") MSG_HASH(MENU_ENUM_LABEL_VALUE_SHADER_PIPELINE_RIBBON, - "Ribbon") + "彩条效果") MSG_HASH(MENU_ENUM_LABEL_VALUE_SHADER_PIPELINE_RIBBON_SIMPLIFIED, - "Ribbon (简化)") + "简易彩条效果") MSG_HASH(MENU_ENUM_LABEL_VALUE_SHADER_PIPELINE_SIMPLE_SNOW, - "Simple Snow") + "简易雪花效果") MSG_HASH(MENU_ENUM_LABEL_VALUE_SHADER_PIPELINE_SNOW, - "Snow") + "雪花效果") MSG_HASH(MENU_ENUM_LABEL_VALUE_SHOW_ADVANCED_SETTINGS, "显示高级设置") MSG_HASH(MENU_ENUM_LABEL_VALUE_SHOW_HIDDEN_FILES, @@ -1384,6 +1472,10 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_SHUTDOWN, "关机") MSG_HASH(MENU_ENUM_LABEL_VALUE_SLOWMOTION_RATIO, "慢动作倍率") +MSG_HASH(MENU_ENUM_LABEL_VALUE_RUN_AHEAD_ENABLED, + "提前运行以降低延迟") +MSG_HASH(MENU_ENUM_LABEL_VALUE_RUN_AHEAD_FRAMES, + "提前运行的帧数") MSG_HASH(MENU_ENUM_LABEL_VALUE_SORT_SAVEFILES_ENABLE, "排序文件夹中的游戏存档") MSG_HASH(MENU_ENUM_LABEL_VALUE_SORT_SAVESTATES_ENABLE, @@ -1556,18 +1648,52 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_THREADED_DATA_RUNLOOP_ENABLE, /* TODO/FIXME - upd "启用多线程数据执行循环") MSG_HASH(MENU_ENUM_LABEL_VALUE_THUMBNAILS, "缩略图") +MSG_HASH(MENU_ENUM_LABEL_VALUE_LEFT_THUMBNAILS, + "左侧缩略图") +MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_VERTICAL_THUMBNAILS, + "缩略图垂直排列") MSG_HASH(MENU_ENUM_LABEL_VALUE_THUMBNAILS_DIRECTORY, "缩略图文件夹") MSG_HASH(MENU_ENUM_LABEL_VALUE_THUMBNAILS_UPDATER_LIST, "缩略图更新程序") MSG_HASH(MENU_ENUM_LABEL_VALUE_THUMBNAIL_MODE_BOXARTS, - "Boxarts") + "游戏包装盒封面") MSG_HASH(MENU_ENUM_LABEL_VALUE_THUMBNAIL_MODE_SCREENSHOTS, "截屏") MSG_HASH(MENU_ENUM_LABEL_VALUE_THUMBNAIL_MODE_TITLE_SCREENS, "标题画面") MSG_HASH(MENU_ENUM_LABEL_VALUE_TIMEDATE_ENABLE, "显示时间日期") +MSG_HASH( + MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE, + "日期/时间格式") +MSG_HASH( + MENU_ENUM_SUBLABEL_TIMEDATE_STYLE, + "更改菜单中当前日期/时间显示格式。") +MSG_HASH( + MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_YMD_HMS, + "YYYY-MM-DD HH:MM:SS") +MSG_HASH( + MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_YMD_HM, + "YYYY-MM-DD HH:MM") +MSG_HASH( + MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_MDYYYY, + "MM-DD-YYYY HH:MM") +MSG_HASH( + MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_HMS, + "HH:MM:SS") +MSG_HASH( + MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_HM, + "HH:MM") +MSG_HASH( + MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_DM_HM, + "DD/MM HH:MM") +MSG_HASH( + MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_MD_HM, + "MM/DD HH:MM") +MSG_HASH( + MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_AM_PM, + "HH:MM:SS (AM/PM)") MSG_HASH(MENU_ENUM_LABEL_VALUE_TITLE_COLOR, "菜单标题颜色") MSG_HASH(MENU_ENUM_LABEL_VALUE_TRUE, @@ -1577,7 +1703,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_UI_COMPANION_ENABLE, MSG_HASH(MENU_ENUM_LABEL_VALUE_UI_COMPANION_START_ON_BOOT, "UI Companion Start On Boot") MSG_HASH(MENU_ENUM_LABEL_VALUE_UI_MENUBAR_ENABLE, - "Menubar") + "菜单栏") MSG_HASH(MENU_ENUM_LABEL_VALUE_UNABLE_TO_READ_COMPRESSED_FILE, "无法读取压缩的文件。") MSG_HASH(MENU_ENUM_LABEL_VALUE_UNDO_LOAD_STATE, @@ -1681,7 +1807,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_REFRESH_RATE, MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_REFRESH_RATE_AUTO, "预估刷新率") MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_REFRESH_RATE_POLLED, - "Set Display-Reported Refresh Rate") + "由视频驱动自行设置刷新率") MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_ROTATION, "旋转") MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_SCALE, @@ -1745,11 +1871,11 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_WIFI_SETTINGS, MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_ALPHA_FACTOR, "菜单透明度因子") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_FONT_COLOR_RED, - "Menu Font Red Color") + "菜单字体 RGB 红色分量") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_FONT_COLOR_GREEN, - "Menu Font Green Color") + "菜单字体 RGB 绿色分量") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_FONT_COLOR_BLUE, - "Menu Font Blue Color") + "菜单字体 RGB 蓝色分量") MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_FONT, "菜单字体") MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_ICON_THEME_CUSTOM, @@ -1812,8 +1938,10 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_SETTINGS, "显示设置页") MSG_HASH(MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_VIDEO, "显示视频页") +MSG_HASH(MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_NETPLAY, + "显示网络联机页") MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_LAYOUT, - "Menu Layout") + "菜单布局") MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_THEME, "菜单图标主题") MSG_HASH(MENU_ENUM_LABEL_VALUE_YES, @@ -1826,6 +1954,14 @@ MSG_HASH(MENU_ENUM_SUBLABEL_CHEEVOS_TEST_UNOFFICIAL, "为测试目的而打开或关闭非官方成就和/或测试版特性。") MSG_HASH(MENU_ENUM_SUBLABEL_CHEEVOS_HARDCORE_MODE_ENABLE, "为所有游戏打开或关闭存档、金手指、回退、快进、暂停和慢动作。") +MSG_HASH(MENU_ENUM_SUBLABEL_CHEEVOS_LEADERBOARDS_ENABLE, + "启用或禁用游戏中排行榜。仅在硬核模式下生效。") +MSG_HASH(MENU_ENUM_SUBLABEL_CHEEVOS_BADGES_ENABLE, + "在成绩列表中启用或禁用徽章显示。") +MSG_HASH(MENU_ENUM_SUBLABEL_CHEEVOS_VERBOSE_ENABLE, + "启用或禁用 OSD 成就情况显示。") +MSG_HASH(MENU_ENUM_SUBLABEL_CHEEVOS_AUTO_SCREENSHOT, + "当完成一个成就时,自动截图。") MSG_HASH(MENU_ENUM_SUBLABEL_DRIVER_SETTINGS, "修改驱动设置。") MSG_HASH(MENU_ENUM_SUBLABEL_RETRO_ACHIEVEMENTS_SETTINGS, @@ -1848,6 +1984,9 @@ MSG_HASH(MENU_ENUM_SUBLABEL_USER_SETTINGS, "修改帐号、用户名和语言。") MSG_HASH(MENU_ENUM_SUBLABEL_PRIVACY_SETTINGS, "修改你的隐私设置。") +MSG_HASH( + MENU_ENUM_SUBLABEL_MIDI_SETTINGS, + "更改 MIDI 设置。") MSG_HASH(MENU_ENUM_SUBLABEL_DIRECTORY_SETTINGS, "修改此系统的默认文件夹。") MSG_HASH(MENU_ENUM_SUBLABEL_PLAYLIST_SETTINGS, @@ -1855,7 +1994,7 @@ MSG_HASH(MENU_ENUM_SUBLABEL_PLAYLIST_SETTINGS, MSG_HASH(MENU_ENUM_SUBLABEL_NETWORK_SETTINGS, "修改网络设置。") MSG_HASH(MENU_ENUM_SUBLABEL_ADD_CONTENT_LIST, - "下载且/或者扫描游戏内容,并将其加入你的收藏中。") + "下载、扫描游戏内容,并将其加入你的收藏中。") MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_SETTINGS, "调整音频输出的选项。") MSG_HASH(MENU_ENUM_SUBLABEL_BLUETOOTH_ENABLE, @@ -1918,7 +2057,7 @@ MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_MONITOR_INDEX, MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_REFRESH_RATE_AUTO, "估算的显示器刷新率(Hz)。") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_REFRESH_RATE_POLLED, - "The refresh rate as reported by the display driver.") + "设置为视频驱动自行设置的刷新率") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_SETTINGS, "调整视频输出的选项。") MSG_HASH(MENU_ENUM_SUBLABEL_WIFI_SETTINGS, @@ -1926,11 +2065,11 @@ MSG_HASH(MENU_ENUM_SUBLABEL_WIFI_SETTINGS, MSG_HASH(MENU_ENUM_SUBLABEL_HELP_LIST, "学习更多关于其是如何工作的。") MSG_HASH(MSG_APPENDED_DISK, - "Appended disk") + "外置磁盘") MSG_HASH(MSG_APPLICATION_DIR, "应用程序文件夹") MSG_HASH(MSG_APPLYING_SHADER, - "Applying shader") + "应用渲染器") MSG_HASH(MSG_AUDIO_MUTED, "静音。") MSG_HASH(MSG_AUDIO_UNMUTED, @@ -1952,11 +2091,11 @@ MSG_HASH(MSG_BYTES, MSG_HASH(MSG_CANNOT_INFER_NEW_CONFIG_PATH, "无法推断新的配置路径,使用当前时间。") MSG_HASH(MSG_CHEEVOS_HARDCORE_MODE_ENABLE, - "硬核模式开启:及时存档和回放被禁用.") + "硬核模式开启:即时存档和回放被禁用。") MSG_HASH(MSG_COMPARING_WITH_KNOWN_MAGIC_NUMBERS, "与已知的magic numbers比较...") MSG_HASH(MSG_COMPILED_AGAINST_API, - "Compiled against API") + "API反编译") MSG_HASH(MSG_CONFIG_DIRECTORY_NOT_SET, "未设置配置文件夹,无法保存新的配置。") MSG_HASH(MSG_CONNECTED_TO, @@ -1970,9 +2109,9 @@ MSG_HASH(MSG_CORE_DOES_NOT_SUPPORT_SAVESTATES, MSG_HASH(MSG_CORE_OPTIONS_FILE_CREATED_SUCCESSFULLY, "已创建核心选项文件。") MSG_HASH(MSG_COULD_NOT_FIND_ANY_NEXT_DRIVER, - "Could not find any next driver") + "找不到更多驱动程序。") MSG_HASH(MSG_COULD_NOT_FIND_COMPATIBLE_SYSTEM, - "Could not find compatible system.") + "找不到兼容的系统。") MSG_HASH(MSG_COULD_NOT_FIND_VALID_DATA_TRACK, "无法找到有效的数据轨") MSG_HASH(MSG_COULD_NOT_OPEN_DATA_TRACK, @@ -1980,11 +2119,11 @@ MSG_HASH(MSG_COULD_NOT_OPEN_DATA_TRACK, MSG_HASH(MSG_COULD_NOT_READ_CONTENT_FILE, "无法读取内容文件") MSG_HASH(MSG_COULD_NOT_READ_MOVIE_HEADER, - "无法读取视频头部信息.") + "无法读取视频头部信息。") MSG_HASH(MSG_COULD_NOT_READ_STATE_FROM_MOVIE, - "无法读取视频状态.") + "无法读取视频状态。") MSG_HASH(MSG_CRC32_CHECKSUM_MISMATCH, - "CRC32 checksum mismatch between content file and saved content checksum in replay file header; replay highly likely to desync on playback.") + "游戏的 CRC32 校验码与录像不一致。录像极有可能在重放时出错。") MSG_HASH(MSG_CUSTOM_TIMING_GIVEN, "Custom timing given") MSG_HASH(MSG_DECOMPRESSION_ALREADY_IN_PROGRESS, @@ -1994,9 +2133,9 @@ MSG_HASH(MSG_DECOMPRESSION_FAILED, MSG_HASH(MSG_DETECTED_VIEWPORT_OF, "Detected viewport of") MSG_HASH(MSG_DID_NOT_FIND_A_VALID_CONTENT_PATCH, - "Did not find a valid content patch.") + "没有找到有效的游戏内容补丁。") MSG_HASH(MSG_DISCONNECT_DEVICE_FROM_A_VALID_PORT, - "Disconnect device from a valid port.") + "从有效端口断开设备。") MSG_HASH(MSG_DISK_CLOSED, "已关闭") MSG_HASH(MSG_DISK_EJECTED, @@ -2026,23 +2165,23 @@ MSG_HASH(MSG_EXTRACTING, MSG_HASH(MSG_EXTRACTING_FILE, "解压文件") MSG_HASH(MSG_FAILED_SAVING_CONFIG_TO, - "无法保存配置到") + "无法将配置文件保存到") MSG_HASH(MSG_FAILED_TO, - "Failed to") + "失败:") MSG_HASH(MSG_FAILED_TO_ACCEPT_INCOMING_SPECTATOR, - "Failed to accept incoming spectator.") + "同意旁观失败。") MSG_HASH(MSG_FAILED_TO_ALLOCATE_MEMORY_FOR_PATCHED_CONTENT, - "Failed to allocate memory for patched content...") + "为游戏补丁分配内存失败...") MSG_HASH(MSG_FAILED_TO_APPLY_SHADER, - "Failed to apply shader.") + "应用渲染器失败。") MSG_HASH(MSG_FAILED_TO_BIND_SOCKET, - "Failed to bind socket.") + "端口绑定失败。") MSG_HASH(MSG_FAILED_TO_CREATE_THE_DIRECTORY, "创建文件夹失败。") MSG_HASH(MSG_FAILED_TO_EXTRACT_CONTENT_FROM_COMPRESSED_FILE, "从压缩文件中提取内容失败") MSG_HASH(MSG_FAILED_TO_GET_NICKNAME_FROM_CLIENT, - "从客户端获取昵称失败.") + "从客户端获取昵称失败。") MSG_HASH(MSG_FAILED_TO_LOAD, "无法加载") MSG_HASH(MSG_FAILED_TO_LOAD_CONTENT, @@ -2058,53 +2197,53 @@ MSG_HASH(MSG_FAILED_TO_OPEN_LIBRETRO_CORE, MSG_HASH(MSG_FAILED_TO_PATCH, "补丁应用失败") MSG_HASH(MSG_FAILED_TO_RECEIVE_HEADER_FROM_CLIENT, - "Failed to receive header from client.") + "接收客户端报文失败。") MSG_HASH(MSG_FAILED_TO_RECEIVE_NICKNAME, - "Failed to receive nickname.") + "接收昵称失败。") MSG_HASH(MSG_FAILED_TO_RECEIVE_NICKNAME_FROM_HOST, - "Failed to receive nickname from host.") + "从主机接收昵称失败。") MSG_HASH(MSG_FAILED_TO_RECEIVE_NICKNAME_SIZE_FROM_HOST, - "Failed to receive nickname size from host.") + "从主机接收昵称大小失败。") MSG_HASH(MSG_FAILED_TO_RECEIVE_SRAM_DATA_FROM_HOST, - "Failed to receive SRAM data from host.") + "从主机接收游戏存档数据失败。") MSG_HASH(MSG_FAILED_TO_REMOVE_DISK_FROM_TRAY, - "Failed to remove disk from tray.") + "从托盘中删除磁盘失败。") MSG_HASH(MSG_FAILED_TO_REMOVE_TEMPORARY_FILE, "移除临时文件失败") MSG_HASH(MSG_FAILED_TO_SAVE_SRAM, - "Failed to save SRAM") + "保存游戏存档失败") MSG_HASH(MSG_FAILED_TO_SAVE_STATE_TO, - "Failed to save state to") + "无法保存即时存档到") MSG_HASH(MSG_FAILED_TO_SEND_NICKNAME, - "发送昵称失败.") + "发送昵称失败。") MSG_HASH(MSG_FAILED_TO_SEND_NICKNAME_SIZE, - "发送昵称尺寸失败.") + "发送昵称尺寸失败。") MSG_HASH(MSG_FAILED_TO_SEND_NICKNAME_TO_CLIENT, - "发送昵称至客户端失败.") + "发送昵称至客户端失败。") MSG_HASH(MSG_FAILED_TO_SEND_NICKNAME_TO_HOST, - "发送昵称至宿主端失败.") + "发送昵称至宿主端失败。") MSG_HASH(MSG_FAILED_TO_SEND_SRAM_DATA_TO_CLIENT, - "发送SRAM数据至客户端失败.") + "发送游戏存档数据至客户端失败。") MSG_HASH(MSG_FAILED_TO_START_AUDIO_DRIVER, "音频驱动启动失败,将在无音频模式下继续启动。") MSG_HASH(MSG_FAILED_TO_START_MOVIE_RECORD, - "启动视频录制失败.") + "启动视频录制失败。") MSG_HASH(MSG_FAILED_TO_START_RECORDING, - "Failed to start recording.") + "开始录制失败。") MSG_HASH(MSG_FAILED_TO_TAKE_SCREENSHOT, - "Failed to take screenshot.") + "截屏失败。") MSG_HASH(MSG_FAILED_TO_UNDO_LOAD_STATE, - "Failed to undo load state.") + "撤消即时读档失败。") MSG_HASH(MSG_FAILED_TO_UNDO_SAVE_STATE, - "Failed to undo save state.") + "撤消即时存档失败。") MSG_HASH(MSG_FAILED_TO_UNMUTE_AUDIO, - "Failed to unmute audio.") + "取消静音失败。") MSG_HASH(MSG_FATAL_ERROR_RECEIVED_IN, "Fatal error received in") MSG_HASH(MSG_FILE_NOT_FOUND, "未找到文件") MSG_HASH(MSG_FOUND_AUTO_SAVESTATE_IN, - "Found auto savestate in") + "已找到自动即时存档,位于:") MSG_HASH(MSG_FOUND_DISK_LABEL, "Found disk label") MSG_HASH(MSG_FOUND_FIRST_DATA_TRACK_ON_FILE, @@ -2134,17 +2273,17 @@ MSG_HASH(MSG_INPUT_CHEAT, MSG_HASH(MSG_INPUT_CHEAT_FILENAME, "Input Cheat Filename") MSG_HASH(MSG_INPUT_PRESET_FILENAME, - "Input Preset Filename") + "输入预置文件名") MSG_HASH(MSG_INPUT_RENAME_ENTRY, - "Rename Title") + "重命名标题") MSG_HASH(MSG_INTERFACE, "接口") MSG_HASH(MSG_INTERNAL_STORAGE, "内部存储") MSG_HASH(MSG_REMOVABLE_STORAGE, - "Removable Storage") + "移动存储") MSG_HASH(MSG_INVALID_NICKNAME_SIZE, - "Invalid nickname size.") + "无效的昵称长度。") MSG_HASH(MSG_IN_BYTES, "(字节)") MSG_HASH(MSG_IN_GIGABYTES, @@ -2176,7 +2315,7 @@ MSG_HASH(MSG_MOVIE_FILE_IS_NOT_A_VALID_BSV1_FILE, MSG_HASH(MSG_MOVIE_FORMAT_DIFFERENT_SERIALIZER_VERSION, "视频格式看起来使用了不同的序列化版本。很有可能失败。") MSG_HASH(MSG_MOVIE_PLAYBACK_ENDED, - "视频回放结束.") + "视频回放结束。") MSG_HASH(MSG_MOVIE_RECORD_STOPPED, "停止视频录制。") MSG_HASH(MSG_NETPLAY_FAILED, @@ -2224,19 +2363,19 @@ MSG_HASH(MSG_RESTORED_OLD_SAVE_STATE, MSG_HASH(MSG_RESTORING_DEFAULT_SHADER_PRESET_TO, "重置渲染器预设到") MSG_HASH(MSG_REVERTING_SAVEFILE_DIRECTORY_TO, - "Reverting savefile directory to") + "恢复保存的文件到目录") MSG_HASH(MSG_REVERTING_SAVESTATE_DIRECTORY_TO, - "Reverting savestate directory to") + "恢复存档文件到目录") MSG_HASH(MSG_REWINDING, "正在回溯。") MSG_HASH(MSG_REWIND_INIT, - "Initializing rewind buffer with size") + "初始化回溯缓冲区大小") MSG_HASH(MSG_REWIND_INIT_FAILED, - "初始化回放缓存失败. 回放功能关闭.") + "初始化回放缓存失败。 回放功能关闭。") MSG_HASH(MSG_REWIND_INIT_FAILED_THREADED_AUDIO, "Implementation uses threaded audio. Cannot use rewind.") MSG_HASH(MSG_REWIND_REACHED_END, - "到达回放缓存末端.") + "到达回溯缓存末端。") MSG_HASH(MSG_SAVED_NEW_CONFIG_TO, "已保存新配置到") MSG_HASH(MSG_SAVED_STATE_TO_SLOT, @@ -2270,13 +2409,13 @@ MSG_HASH(MSG_FAST_FORWARD, MSG_HASH(MSG_SLOW_MOTION_REWIND, "慢动作回溯。") MSG_HASH(MSG_SRAM_WILL_NOT_BE_SAVED, - "SRAM will not be saved.") + "SRAM不会被保存。") MSG_HASH(MSG_STARTING_MOVIE_PLAYBACK, - "视频回放.") + "开始回放视频。") MSG_HASH(MSG_STARTING_MOVIE_RECORD_TO, - "Starting movie record to") + "启动视频录制到") MSG_HASH(MSG_STATE_SIZE, - "State size") + "即时存档大小") MSG_HASH(MSG_STATE_SLOT, "即时存档栏位") MSG_HASH(MSG_TAKING_SCREENSHOT, @@ -2298,7 +2437,7 @@ MSG_HASH(MSG_USING_CORE_NAME_FOR_NEW_CONFIG, MSG_HASH(MSG_USING_LIBRETRO_DUMMY_CORE_RECORDING_SKIPPED, "使用libretro虚拟核心。跳过录制。") MSG_HASH(MSG_VALUE_CONNECT_DEVICE_FROM_A_VALID_PORT, - "Connect device from a valid port.") + "从有效端口连接设备。") MSG_HASH(MSG_VALUE_DISCONNECTING_DEVICE_FROM_PORT, "从端口断开设备") MSG_HASH(MSG_VALUE_REBOOTING, @@ -2308,16 +2447,16 @@ MSG_HASH(MSG_VALUE_SHUTTING_DOWN, MSG_HASH(MSG_VERSION_OF_LIBRETRO_API, "libretro API版本") MSG_HASH(MSG_VIEWPORT_SIZE_CALCULATION_FAILED, - "Viewport size calculation failed! Will continue using raw data. This will probably not work right ...") + "可视区域尺寸计算失败!将继续使用原始数据,这很可能不会正常工作。") MSG_HASH(MSG_VIRTUAL_DISK_TRAY, - "virtual disk tray.") + "虚拟磁盘托盘。") MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_LATENCY, - "Desired audio latency in milliseconds. Might not be honored if the audio driver can't provide given latency.") + "毫秒级音频延时。 如果音频驱动程序不支持将无法使用。") MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_MUTE, "禁音/取消禁音。") MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_RATE_CONTROL_DELTA, - "Helps smooth out imperfections in timing when synchronizing audio and video at the same time. Be aware that if disabled, proper synchronization is nearly impossible to obtain." + "有助于同步音频和视频。请注意,如果禁用,音频和视频几乎一定会错位。" ) MSG_HASH( MENU_ENUM_SUBLABEL_CAMERA_ALLOW, @@ -2325,15 +2464,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_LOCATION_ALLOW, - "Allow or disallow location services access by cores." + "启用或禁用基于核心的位置服务访问。" ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_MAX_USERS, - "Maximum amount of users supported by RetroArch." + "支持玩家的最大数量" ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_POLL_TYPE_BEHAVIOR, - "Influence how input polling is done inside RetroArch. Setting it to 'Early' or 'Late' can result in less latency, depending on your configuration." + "设置轮询方式。 根据设备的性能,设置为「较早」或「稍晚」可以让等待时间缩短。" ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_ALL_USERS_CONTROL_MENU, @@ -2473,7 +2612,7 @@ MSG_HASH(MSG_NETPLAY_LAN_SCANNING, MSG_HASH(MENU_ENUM_SUBLABEL_PAUSE_NONACTIVE, "当窗口失去焦点时暂停游戏。") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_DISABLE_COMPOSITION, - "Enable or disable composition.") + "启用或禁用桌面布局。") MSG_HASH(MENU_ENUM_SUBLABEL_HISTORY_LIST_ENABLE, "为游戏、图片、音乐和视频启用/禁用历史记录。") MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_HISTORY_SIZE, @@ -2481,7 +2620,7 @@ MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_HISTORY_SIZE, MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_UNIFIED_MENU_CONTROLS, "统一菜单控制") MSG_HASH(MENU_ENUM_SUBLABEL_INPUT_UNIFIED_MENU_CONTROLS, - "Use the same controls for both the menu and the game. Applies to the keyboard.") + "在菜单和游戏中使用相同的控制配置。应用于键盘。") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_FONT_ENABLE, "显示屏幕消息。") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETWORK_USER_REMOTE_ENABLE, @@ -2499,7 +2638,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_SCALE, MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_START_WHEN_LOADED, "联机游戏将在内容加载后开始。") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_LOAD_CONTENT_MANUALLY, - "无法找到合适的核心或内容文件,手动加载。") + "无法找到合适的核心或内容文件,请手动加载。") MSG_HASH( MENU_ENUM_LABEL_VALUE_BROWSE_URL_LIST, "浏览URL" @@ -2527,7 +2666,8 @@ MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_CROP_OVERSCAN, MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_SMOOTH, "轻微模糊像素点边缘以减少像素颗粒感。对运行速度影响很小。") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_FILTER, - "加载一个由 CPU 控制的视频过滤器。注意:这可能显著降低游戏运行速度。某些视频过滤器仅对32位色(或16位色)核心生效。") + "加载一个由 CPU 控制的视频过滤器。注意:这\n" + "可能显著降低游戏运行速度。某些视频过滤器仅对32位色(或16位色)核心生效。") MSG_HASH(MENU_ENUM_SUBLABEL_CHEEVOS_USERNAME, "输入您的 Retro 成就账号的用户名。") MSG_HASH(MENU_ENUM_SUBLABEL_CHEEVOS_PASSWORD, @@ -2535,13 +2675,13 @@ MSG_HASH(MENU_ENUM_SUBLABEL_CHEEVOS_PASSWORD, MSG_HASH(MENU_ENUM_SUBLABEL_NETPLAY_NICKNAME, "在这里输入您的昵称,用于联网和一些其他服务。") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_POST_FILTER_RECORD, - "Capture the image after filters (but not shaders) are applied. Your video will look as fancy as what you see on your screen.") + "去除滤镜后(而不是渲染器)捕获图像。视频与屏幕上显示的一样。") MSG_HASH(MENU_ENUM_SUBLABEL_CORE_LIST, "选择使用的模拟器核心。") MSG_HASH(MENU_ENUM_SUBLABEL_LOAD_CONTENT_LIST, "选择需要加载的游戏。") MSG_HASH(MENU_ENUM_SUBLABEL_NETWORK_INFORMATION, - "Show network interface(s) and associated IP addresses.") + "显示网络接口和相关IP地址信息。") MSG_HASH(MENU_ENUM_SUBLABEL_SYSTEM_INFORMATION, "显示此设备的信息。") MSG_HASH(MENU_ENUM_SUBLABEL_QUIT_RETROARCH, @@ -2562,14 +2702,18 @@ MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_FONT_SIZE, "设置字体大小(单位:像素)。") MSG_HASH(MENU_ENUM_SUBLABEL_INPUT_OVERLAY_HIDE_IN_MENU, "在菜单中隐藏图层,退出菜单后重新显示。") +MSG_HASH(MENU_ENUM_SUBLABEL_INPUT_OVERLAY_SHOW_PHYSICAL_INPUTS, + "在屏幕图层上显示键盘/控制器。") +MSG_HASH(MENU_ENUM_SUBLABEL_INPUT_OVERLAY_SHOW_PHYSICAL_INPUTS_PORT, + "如果开启“在图层上显示控制器”,请选择相应屏幕图层的端口来侦听。") MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_COLLECTION_LIST, "扫描到的游戏内容将在此处显示。" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SCALE_INTEGER, - "只放大整数倍显示。基础分辨率与游戏、宽高比有关。如果「保持宽高比」选项未开启,不保证宽高放大倍数相同。" - ) + "只放大整数倍显示。基础分辨率与游戏、宽高比有关。\n" + "如果「保持宽高比」选项未开启,不保证宽高放大倍数相同。") MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_GPU_SCREENSHOT, "使用 GPU 输出来进行截图(如果可能的话)。" @@ -2596,7 +2740,8 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SAVESTATE_AUTO_INDEX, - "每次储存即时存档时,都在新的栏位储存,以避免覆盖原有的即时存档。每次运行游戏时,都会定位到最新的即时存档栏位。") + "每次储存即时存档时,都在新的栏位储存,以避免覆盖原有的即时存档。\n" + "每次运行游戏时,都会定位到最新的即时存档栏位。") MSG_HASH( MENU_ENUM_SUBLABEL_BLOCK_SRAM_OVERWRITE, "读取即时存档时不覆盖游戏存档。可能会导致某些游戏产生 BUG。" @@ -2609,6 +2754,13 @@ MSG_HASH( MENU_ENUM_SUBLABEL_SLOWMOTION_RATIO, "减速时以几分之一速度运行。" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_RUN_AHEAD_ENABLED, + "提前运行核心逻辑一帧或多帧,以降低按键延迟。" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_RUN_AHEAD_FRAMES, + "设置要提前运行的帧数。 如果滞后于游戏本体的帧数将导致类似于抖动之类的游戏问题。") MSG_HASH( MENU_ENUM_SUBLABEL_REWIND_ENABLE, "启用回溯倒带功能。对游戏运行速度有一定影响。" @@ -2617,6 +2769,15 @@ MSG_HASH( MENU_ENUM_SUBLABEL_REWIND_GRANULARITY, "每次回溯时回退的帧数。数值越高,回溯越快。" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_REWIND_BUFFER_SIZE, + "回溯缓冲区保留的内存量(单位:MB)。增加内存量可增加回溯历史的时间。" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_REWIND_BUFFER_SIZE_STEP, + "每次增加或减少回溯缓冲区内存量值时,回溯历史将按此大小改变。" + ) + MSG_HASH( MENU_ENUM_SUBLABEL_LIBRETRO_LOG_LEVEL, "Sets log level for cores. If a log level issued by a core is below this value, it is ignored." @@ -2627,7 +2788,8 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SAVESTATE_AUTO_SAVE, - "在 RetroArch 关闭时自动保存即时存档。如果开启了「自动加载即时存档」功能,下次开始游戏时会加载该存档。" + "在RetroArch关闭时自动保存即时存档。\n" + "如果开启了「自动加载即时存档」功能,下次开始游戏时会加载该存档。" ) MSG_HASH( MENU_ENUM_SUBLABEL_SAVESTATE_AUTO_LOAD, @@ -2639,7 +2801,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_AUTOSAVE_INTERVAL, - "每隔一段时间(单位:秒)自动保存游戏存档,此选项默认关闭(0 表示关闭)。" + "每隔一段时间(单位:秒)自动保存游戏存档,此选项默认关闭。" ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_REMAP_BINDS_ENABLE, @@ -2719,7 +2881,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_DSP_PLUGIN, - "Audio DSP plugin that processes audio before it's sent to the driver." + "音频 DSP 插件,用于驱动程序处理之前处理音频。" ) MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_OUTPUT_RATE, @@ -2743,47 +2905,47 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_IP_ADDRESS, - "The address of the host to connect to." + "要连接到在线游戏网络服务器的地址。" ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_TCP_UDP_PORT, - "The port of the host IP address. Can be either a TCP or UDP port." + "服务器 IP 地址端口。可以是 TCP 或 UDP 端口。" ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_PASSWORD, - "The password for connecting to the netplay host. Used only in host mode." + "连接到在线游戏网络的密码。仅在主机模式下生效。" ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_PUBLIC_ANNOUNCE, - "Whether to announce netplay games publicly. If unset, clients must manually connect rather than using the public lobby." + "是否使用公共的在线游戏网络。如果未设置,客户端必须手动连接而不使用公共的在线游戏网络。" ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_SPECTATE_PASSWORD, - "The password for connecting to the netplay host with only spectator privileges. Used only in host mode." + "连接到在线游戏网络的密码,仅有观战权限。仅在主机模式下使用。" ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_START_AS_SPECTATOR, - "Whether to start netplay in spectator mode." + "是否启动在线游戏旁观者模式。" ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_ALLOW_SLAVES, - "Whether to allow connections in slave mode. Slave-mode clients require very little processing power on either side, but will suffer significantly from network latency." + "是否允许从属模式网络连接。从属模式客户端占用网络带宽小,但网络延迟的比较大。" ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_REQUIRE_SLAVES, - "Whether to disallow connections not in slave mode. Not recommended except for very fast networks with very weak machines." + "是否禁止从属模式网络连接的客户端连接。仅建议网络速度快、主机性能高的用户开启。" ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_STATELESS_MODE, - "Whether to run netplay in a mode not requiring save states. If set to true, a very fast network is required, but no rewinding is performed, so there will be no netplay jitter." + "是否在不保存存档的模式下运行在线游戏。开启后联机将不会有时间误差,但需要非常快的网络,且不能使用回溯功能。" ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_CHECK_FRAMES, - "The frequency in frames with which netplay will verify that the host and client are in sync." + "在线游戏中主机和客户端的帧频率将保持同步。" ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_NAT_TRAVERSAL, - "When hosting, attempt to listen for connections from the public Internet, using UPnP or similar technologies to escape LANs." + "当联机时,侦听来自公共互联网的连接,使用 UPnP 或类似的技术来规避局域网问题。" ) MSG_HASH( MENU_ENUM_SUBLABEL_STDIN_CMD_ENABLE, @@ -2801,6 +2963,14 @@ MSG_HASH( MENU_ENUM_SUBLABEL_THUMBNAILS, "缩略图的显示类型。" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_LEFT_THUMBNAILS, + "在屏幕左侧显示缩略图。" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_XMB_VERTICAL_THUMBNAILS, + "在屏幕右侧缩略图的下方显示左侧缩略图。" + ) MSG_HASH( MENU_ENUM_SUBLABEL_TIMEDATE_ENABLE, "在菜单中显示当前的日期和时间。" @@ -2822,11 +2992,11 @@ MSG_HASH(MENU_ENUM_SUBLABEL_NETPLAY_ENABLE_CLIENT, MSG_HASH(MENU_ENUM_SUBLABEL_NETPLAY_DISCONNECT, "断开当前网络连接。") MSG_HASH(MENU_ENUM_SUBLABEL_SCAN_DIRECTORY, - "Scans a directory for compatible files and add them to the collection.") + "扫描目录并将兼容的文件添加到合集中。") MSG_HASH(MENU_ENUM_SUBLABEL_SCAN_FILE, - "Scans a compatible file and add it to the collection.") + "扫描一个兼容的文件并将其添加到合集中") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_SWAP_INTERVAL, - "Uses a custom swap interval for Vsync. Set this to effectively halve monitor refresh rate." + "为垂直同步使用自定义的交换间隔。该设置可以有效地降低显示器刷新率。" ) MSG_HASH(MENU_ENUM_SUBLABEL_SORT_SAVEFILES_ENABLE, "在游戏存档的文件名前面加上核心名称来进行排序。" @@ -2835,18 +3005,18 @@ MSG_HASH(MENU_ENUM_SUBLABEL_SORT_SAVESTATES_ENABLE, "在即时存档的文件名前面加上核心名称来进行排序。" ) MSG_HASH(MENU_ENUM_SUBLABEL_CORE_UPDATER_BUILDBOT_URL, - "URL to core updater directory on the Libretro buildbot.") + "Libretro buildbot 核心目录的更新 URL。") MSG_HASH(MENU_ENUM_SUBLABEL_BUILDBOT_ASSETS_URL, - "URL to assets updater directory on the Libretro buildbot.") + "Libretro buildbot 资源目录的更新 URL。") MSG_HASH(MENU_ENUM_SUBLABEL_CORE_UPDATER_AUTO_EXTRACT_ARCHIVE, "下载后自动解压。" ) MSG_HASH(MENU_ENUM_SUBLABEL_NETPLAY_REFRESH_ROOMS, - "Scan for new rooms.") + "扫描新房间。") MSG_HASH(MENU_ENUM_SUBLABEL_DELETE_ENTRY, "删除此条目。") MSG_HASH(MENU_ENUM_SUBLABEL_INFORMATION, - "View more information about the content.") + "查看该内容的更多相关信息。") MSG_HASH(MENU_ENUM_SUBLABEL_ADD_TO_FAVORITES, "将此游戏加入你的收藏夹。") MSG_HASH(MENU_ENUM_SUBLABEL_ADD_TO_FAVORITES_PLAYLIST, @@ -2857,20 +3027,20 @@ MSG_HASH(MENU_ENUM_SUBLABEL_MENU_FILE_BROWSER_SETTINGS, "调整文件管理器设置。") MSG_HASH( MENU_ENUM_SUBLABEL_AUTO_REMAPS_ENABLE, - "Enable customized controls by default at startup." + "程序启动时默认启用自定义控件。" ) MSG_HASH( MENU_ENUM_SUBLABEL_AUTO_OVERRIDES_ENABLE, - "Enable customized configuration by default at startup." + "启动时默认启用自定义配置。" ) MSG_HASH(MENU_ENUM_SUBLABEL_GAME_SPECIFIC_OPTIONS, - "Enable customized core options by default at startup.") + "启动时默认启用自定义核心选项") MSG_HASH(MENU_ENUM_SUBLABEL_CORE_ENABLE, - "Shows current core name inside menu.") + "在内部菜单中显示当前核心名称。") MSG_HASH(MENU_ENUM_SUBLABEL_DATABASE_MANAGER, - "View databases.") + "查看游戏信息数据库。") MSG_HASH(MENU_ENUM_SUBLABEL_CURSOR_MANAGER, - "View previous searches.") + "查看以前的搜索记录。") MSG_HASH(MENU_ENUM_SUBLABEL_TAKE_SCREENSHOT, "截取当前屏幕。") MSG_HASH( @@ -2893,11 +3063,11 @@ MSG_HASH(MENU_ENUM_SUBLABEL_UNDO_SAVE_STATE, "如果你不慎覆盖了即时存档,使用此命令来撤销。") MSG_HASH( MENU_ENUM_SUBLABEL_ACCOUNTS_RETRO_ACHIEVEMENTS, - "Retro Achievements service. For more information, visit http://retroachievements.org" + "Retro 成就服务。更多内容请访问 http://retroachievements.org" ) MSG_HASH( MENU_ENUM_SUBLABEL_ACCOUNTS_LIST, - "Manages currently configured accounts." + "管理当前用户的配置。" ) MSG_HASH(MENU_ENUM_SUBLABEL_INPUT_META_REWIND, "调整游戏回溯功能设置。") @@ -2920,7 +3090,7 @@ MSG_HASH(MENU_ENUM_SUBLABEL_CORE_OPTIONS, MSG_HASH(MENU_ENUM_SUBLABEL_SHOW_ADVANCED_SETTINGS, "为高级用户显示更多设置项(默认关闭)。") MSG_HASH(MENU_ENUM_SUBLABEL_THREADED_DATA_RUNLOOP_ENABLE, - "Perform tasks on a separate thread.") + "在单独的线程上执行任务。") MSG_HASH(MENU_ENUM_SUBLABEL_PLAYLIST_ENTRY_REMOVE, "允许用户从收藏夹中删除游戏。") MSG_HASH(MENU_ENUM_SUBLABEL_SYSTEM_DIRECTORY, @@ -2939,51 +3109,51 @@ MSG_HASH(MENU_ENUM_SUBLABEL_THUMBNAILS_DIRECTORY, MSG_HASH(MENU_ENUM_SUBLABEL_RGUI_CONFIG_DIRECTORY, "Sets start directory for menu configuration browser.") MSG_HASH(MENU_ENUM_SUBLABEL_NETPLAY_INPUT_LATENCY_FRAMES_MIN, - "The number of frames of input latency for netplay to use to hide network latency. Reduces jitter and makes netplay less CPU-intensive, at the expense of noticeable input lag.") + "设置按键延迟以掩盖网络延迟。用按键延迟换取在线游戏时降低CPU负载并减少顿卡。") MSG_HASH(MENU_ENUM_SUBLABEL_NETPLAY_INPUT_LATENCY_FRAMES_RANGE, - "The range of frames of input latency that may be used to hide network latency. Reduces jitter and makes netplay less CPU-intensive, at the expense of unpredictable input lag.") + "设置按键延迟范围以掩盖网络的延迟。用延迟范围内的按键延迟换取在线游戏时降低CPU负载并减少顿卡。") MSG_HASH(MENU_ENUM_SUBLABEL_DISK_CYCLE_TRAY_STATUS, "Cycle the current disk. If the disk is inserted, it will eject the disk. If the disk has not been inserted, it will be inserted. ") MSG_HASH(MENU_ENUM_SUBLABEL_DISK_INDEX, - "Change the disk index.") + "更改磁盘索引。") MSG_HASH(MENU_ENUM_SUBLABEL_DISK_OPTIONS, - "Disk image management.") + "管理磁盘映像。") MSG_HASH(MENU_ENUM_SUBLABEL_DISK_IMAGE_APPEND, - "Select a disk image to insert.") + "选择要插入的磁盘映像。") MSG_HASH(MENU_ENUM_SUBLABEL_MENU_ENUM_THROTTLE_FRAMERATE, "Makes sure the framerate is capped while inside the menu.") MSG_HASH(MENU_ENUM_SUBLABEL_XMB_LAYOUT, - "Select a different layout for the XMB interface.") + "设置多种XMB界面布局。") MSG_HASH(MENU_ENUM_SUBLABEL_XMB_THEME, - "Select a different theme for the icon. Changes will take effect after you restart the program.") + "设置多种的图标主题。重新启动程序后,更改将生效。") MSG_HASH(MENU_ENUM_SUBLABEL_XMB_SHADOWS_ENABLE, - "Enable drop shadows for all icons. This will have a minor performance hit.") + "启用图标阴影功能。这可能会损失一点点性能。") MSG_HASH(MENU_ENUM_SUBLABEL_MATERIALUI_MENU_COLOR_THEME, - "Select a different background color gradient theme.") + "设置多种颜色背景的渐变主题。") MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WALLPAPER_OPACITY, - "Modify the opacity of the background wallpaper.") + "设置壁纸的不透明度。") MSG_HASH(MENU_ENUM_SUBLABEL_XMB_MENU_COLOR_THEME, - "Select a different background color gradient theme.") + "设置多种颜色的渐变主题。") MSG_HASH(MENU_ENUM_SUBLABEL_XMB_RIBBON_ENABLE, - "Select an animated background effect. Can be GPU-intensive depending on the effect. If performance is unsatisfactory, either turn this off or revert to a simpler effect.") + "选择背景动画效果。效果由GPU性能而定,如果性能不理想,请关闭此功能或选择简单特效。") MSG_HASH(MENU_ENUM_SUBLABEL_XMB_FONT, - "Select a different main font to be used by the menu.") + "设置菜单中使用的自定义字体文件。") MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_SHOW_IMAGES, - "Show the image tab inside the main menu.") + "在主菜单中显示图像页。") MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_SHOW_MUSIC, - "Show the music tab inside the main menu.") + "在主菜单中显示音乐页。") MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_SHOW_VIDEO, - "Show the video tab inside the main menu.") + "在主菜单中显示视频页。") MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_SHOW_NETPLAY, - "Show the netplay tab inside the main menu.") + "在主菜单中显示网络联机页。") MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_SHOW_SETTINGS, - "Show the settings tab inside the main menu.") + "在主菜单中显示设置页。") MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_SHOW_HISTORY, - "Show the recent history tab inside the main menu.") + "在主菜单中显示最近的历史记录页。") MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_SHOW_ADD, - "Show the import content tab inside the main menu.") + "在主菜单中显示导入内容页。") MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_SHOW_PLAYLISTS, - "Show playlist tabs inside the main menu.") + "在主菜单中显示游戏列表页") MSG_HASH(MENU_ENUM_SUBLABEL_RGUI_SHOW_START_SCREEN, "Show startup screen in menu. This is automatically set to false after the program starts for the first time.") MSG_HASH(MENU_ENUM_SUBLABEL_MATERIALUI_MENU_HEADER_OPACITY, @@ -2995,7 +3165,7 @@ MSG_HASH(MENU_ENUM_SUBLABEL_DPI_OVERRIDE_ENABLE, MSG_HASH(MENU_ENUM_SUBLABEL_DPI_OVERRIDE_VALUE, "Set the custom scaling size here. NOTE: You have to enable 'DPI Override' for this scaling size to take effect.") MSG_HASH(MENU_ENUM_SUBLABEL_CORE_ASSETS_DIRECTORY, - "Save all downloaded files to this directory.") + "设置下载文件夹。下载的文件存放在这里。") MSG_HASH(MENU_ENUM_SUBLABEL_INPUT_REMAPPING_DIRECTORY, "Save all remapped controls to this directory.") MSG_HASH(MENU_ENUM_SUBLABEL_LIBRETRO_DIR_PATH, @@ -3018,12 +3188,12 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_ASSETS_DIRECTORY, - "This location is queried by default when menu interfaces try to look for loadable assets, etc." + "当菜单界面试图查找可加载的资源时,默认情况下查找此位置。" ) MSG_HASH(MENU_ENUM_SUBLABEL_SAVEFILE_DIRECTORY, - "Save all save files to this directory. If not set, will try to save inside the content file's working directory.") + "将所有保存文件保存到该目录。如果没有设置,将尝试保存游戏内容文件的工作目录内。") MSG_HASH(MENU_ENUM_SUBLABEL_SAVESTATE_DIRECTORY, - "Save all save states to this directory. If not set, will try to save inside the content file's working directory.") + "将所有存档保存到该目录。如果没有设置,将尝试保存游戏内容文件的工作目录内。") MSG_HASH(MENU_ENUM_SUBLABEL_SCREENSHOT_DIRECTORY, "Directory to dump screenshots to.") MSG_HASH(MENU_ENUM_SUBLABEL_OVERLAY_DIRECTORY, @@ -3034,7 +3204,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_FILTER_DIR, - "Directory where audio DSP filter files are kept." + "保存音频 DSP 插件文件的目录。" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_FILTER_DIR, @@ -3083,21 +3253,25 @@ MSG_HASH( MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_SETTINGS, "快速配置游戏内设置。") MSG_HASH(MENU_ENUM_SUBLABEL_CORE_INFORMATION, - "View information pertaining to the application/core.") + "查看应用、内核的相关的信息。") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_ASPECT_RATIO, "Floating point value for video aspect ratio (width / height), used if the Aspect Ratio is set to 'Config'.") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_VIEWPORT_CUSTOM_HEIGHT, - "Custom viewport height that is used if the Aspect Ratio is set to 'Custom'.") + "如果宽高比设为「自定义」,将使用自定义的视窗高度。") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_VIEWPORT_CUSTOM_WIDTH, - "Custom viewport width that is used if the Aspect Ratio is set to 'Custom'.") + "如果宽高比设为「自定义」,将使用自定义的视窗宽度。") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_VIEWPORT_CUSTOM_X, - "Custom viewport offset used for defining the X-axis position of the viewport. These are ignored if 'Integer Scale' is enabled. It will be automatically centered then.") + "视窗左上角的 X 坐标。如果「放大整数倍」选项已开启,则设置无效。图像将显示在中心。") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_VIEWPORT_CUSTOM_Y, - "Custom viewport offset used for defining the Y-axis position of the viewport. These are ignored if 'Integer Scale' is enabled. It will be automatically centered then.") + "视窗左上角的 Y 坐标。如果「放大整数倍」选项已开启,则设置无效。图像将显示在中心。") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_USE_MITM_SERVER, - "Use Relay Server") + "启用代理服务器") MSG_HASH(MENU_ENUM_SUBLABEL_NETPLAY_USE_MITM_SERVER, - "Forward netplay connections through a man-in-the-middle server. Useful if the host is behind a firewall or has NAT/UPnP problems.") + "通过代理服务器进行网络连接。如果主机位于防火墙之后或具有NAT/UPnP问题时,建议开启。") +MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_MITM_SERVER, + "代理服务器位置") +MSG_HASH(MENU_ENUM_SUBLABEL_NETPLAY_MITM_SERVER, + "选择一个代理服务器。服务器位置比较接近的一般网络延迟更低。") MSG_HASH(MENU_ENUM_LABEL_VALUE_ADD_TO_MIXER, "Add to mixer") MSG_HASH(MENU_ENUM_LABEL_VALUE_ADD_TO_MIXER_AND_PLAY, @@ -3110,134 +3284,138 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_FILTER_BY_CURRENT_CORE, "Filter by current core") MSG_HASH( MSG_AUDIO_MIXER_VOLUME, - "Global audio mixer volume" + "全局音效混合器音量" ) MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_MIXER_VOLUME, - "Global audio mixer volume (in dB). 0 dB is normal volume, and no gain is applied." + "全局音效混合器音量(单位:分贝)。 0 为正常音量。" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_MIXER_VOLUME, - "Audio Mixer Volume Level (dB)" + "音效混合器音量级别(dB)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_MIXER_MUTE, - "Audio Mixer Mute" + "音效混合器开关" ) MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_MIXER_MUTE, - "Mute/unmute mixer audio.") + "开启/关闭音效混合器。") MSG_HASH(MENU_ENUM_LABEL_MENU_SHOW_ONLINE_UPDATER, - "Show Online Updater") + "显示「在线更新器」") MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_ONLINE_UPDATER, - "Show/hide the 'Online Updater' option.") + "显示或隐藏「在线更新器」的选项。") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_VIEWS_SETTINGS, + "视图") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_VIEWS_SETTINGS, + "显示或隐藏屏幕上的菜单元素。") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_CORE_UPDATER, - "Show Core Updater") + "显示「核心更新程序」") MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_CORE_UPDATER, - "Show/hide the ability to update cores (and core info files).") + "显示或隐藏「核心更新程序」的选项。") MSG_HASH(MSG_PREPARING_FOR_CONTENT_SCAN, - "Preparing for content scan...") + "准备扫描内容…") MSG_HASH(MENU_ENUM_LABEL_VALUE_CORE_DELETE, - "Delete core") + "删除核心") MSG_HASH(MENU_ENUM_SUBLABEL_CORE_DELETE, - "Remove this core from disk.") + "从磁盘中删除该核心") MSG_HASH(MENU_ENUM_LABEL_VALUE_RENAME_ENTRY, "重命名此条目") MSG_HASH(MENU_ENUM_LABEL_RENAME_ENTRY, - "Rename") + "重命名") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_FRAMEBUFFER_OPACITY, "Framebuffer Opacity") MSG_HASH(MENU_ENUM_SUBLABEL_MENU_FRAMEBUFFER_OPACITY, "Modify the opacity of the framebuffer.") MSG_HASH(MENU_ENUM_LABEL_VALUE_GOTO_FAVORITES, - "Favorites") + "收藏夹") MSG_HASH(MENU_ENUM_SUBLABEL_GOTO_FAVORITES, - "Content which you have added to 'Favorites' will appear here.") + "已经添加到“收藏夹”的内容将出现在这里。") MSG_HASH(MENU_ENUM_LABEL_VALUE_GOTO_MUSIC, - "Music") + "音乐") MSG_HASH(MENU_ENUM_SUBLABEL_GOTO_MUSIC, - "Music which has been previously played will appear here.") + "以前播放过的音乐将出现在这里。") MSG_HASH(MENU_ENUM_LABEL_VALUE_GOTO_IMAGES, - "Image") + "图像") MSG_HASH(MENU_ENUM_SUBLABEL_GOTO_IMAGES, - "Images which have been previously viewed will appear here.") + "以前看过的图像将出现在这里。") MSG_HASH(MENU_ENUM_LABEL_VALUE_GOTO_VIDEO, - "Video") + "视频") MSG_HASH(MENU_ENUM_SUBLABEL_GOTO_VIDEO, - "Videos which have been previously played will appear here.") + "以前看过的视频将出现在这里。") MSG_HASH(MENU_ENUM_LABEL_VALUE_MATERIALUI_ICONS_ENABLE, - "Menu Icons") + "菜单图标") MSG_HASH(MENU_ENUM_SUBLABEL_MATERIALUI_ICONS_ENABLE, - "Enable/disable the menu icons shown at the lefthand side of the menu entries.") + "启用或禁用菜单条目左侧显示的菜单图标") MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_MAIN_MENU_ENABLE_SETTINGS, - "Enable Settings Tab") + "启用设置页") MSG_HASH(MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_SETTINGS_PASSWORD, - "Set Password For Enabling Settings Tab") + "设置启用设置页的密码") MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD, - "Enter Password") + "输入密码") MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_OK, - "Password correct.") + "密码正确。") MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_NOK, - "Password incorrect.") + "密码不正确。") MSG_HASH(MENU_ENUM_SUBLABEL_XMB_MAIN_MENU_ENABLE_SETTINGS, - "Enables the Settings tab. A restart is required for the tab to appear.") + "启用设置页。修改启用设置页需要重新启动 RetroArch。") MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_SHOW_SETTINGS_PASSWORD, - "Supplying a password when hiding the settings tab makes it possible to later restore it from the menu, by going to the Main Menu tab, selecting Enable Settings Tab and entering the password.") + "设置在隐藏设置页后,重新启用设置页的密码。启用方法:在主菜单中选择「启用设置页」并输入密码来重新启用设置页。") MSG_HASH(MENU_ENUM_SUBLABEL_PLAYLIST_ENTRY_RENAME, - "Allow the user to rename entries in collections.") + "允许在集合中重命名条目。") MSG_HASH(MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_RENAME, - "Allow to rename entries") + "允许重命名条目") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CORE, - "Show Load Core") + "显示「加载核心」") MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_LOAD_CORE, - "Show/hide the 'Load Core' option.") + "显示或隐藏「加载核心」选项。") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CONTENT, - "Show Load Content") + "显示「载入游戏内容」") MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_LOAD_CONTENT, - "Show/hide the 'Load Content' option.") + "显示或隐藏「载入游戏内容」选项。") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_INFORMATION, - "Show Information") + "显示「信息」") MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_INFORMATION, - "Show/hide the 'Information' option.") + "显示或隐藏「信息」选项。") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_CONFIGURATIONS, - "Show Configurations") + "显示「配置」") MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_CONFIGURATIONS, - "Show/hide the 'Configurations' option.") + "显示或隐藏「配置」选项。") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_HELP, - "Show Help") + "显示「帮助」") MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_HELP, - "Show/hide the 'Help' option.") + "显示或隐藏「帮助」选项。") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH, - "Show Quit RetroArch") + "显示「退出 RetroArch」") MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH, - "Show/hide the 'Quit RetroArch' option.") + "显示或隐藏「退出 RetroArch」选项。") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_REBOOT, - "Show Reboot") + "显示「重启 RetroArch」") MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_REBOOT, - "Show/hide the 'Reboot' option.") + "显示或隐藏「重启 RetroArch」选项。") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_SHUTDOWN, - "Show Shutdown") + "显示「关闭」") MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_SHUTDOWN, - "Show/hide the 'Shutdown' option.") + "显示或隐藏「关闭」选项。") MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_VIEWS_SETTINGS, - "Quick Menu") + "快速菜单") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_VIEWS_SETTINGS, - "Show or hide elements on the Quick Menu screen.") + "显示或隐藏快速菜单屏幕上的元素。") MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_TAKE_SCREENSHOT, - "Show Take Screenshot") + "显示「截图」") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_TAKE_SCREENSHOT, - "Show/hide the 'Take Screenshot' option.") + "显示或隐藏「截图”选项」。") MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_LOAD_STATE, - "Show Save/Load State") + "显示「保存/即时读档」") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_LOAD_STATE, - "Show/hide the options for saving/loading state.") + "显示「保存/即时读档」选项。") MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, - "Show Undo Save/Load State") + "显示「撤消保存/即时读档」") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, - "Show/hide the options for undoing save/load state.") + "显示或隐藏 「撤消保存/即时读档」的选项。") MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES, - "Show Add to Favorites") + "显示「添加到收藏夹」") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES, - "Show/hide the 'Add to Favorites' option.") + "显示或隐藏「添加到收藏夹」选项。") MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS, "显示「核心选项」") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS, @@ -3263,13 +3441,23 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, "显示或隐藏「保存游戏独立配置」选项。") MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_INFORMATION, - "Show Information") + "显示「信息」") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_INFORMATION, - "Show/hide the 'Information' option.") + "显示或隐藏「信息」选项。") +MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_BGCOLOR_ENABLE, + "显示屏显消息(OSD)背景") +MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_BGCOLOR_RED, + "屏显消息(OSD)背景RGB颜色 红色") +MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_BGCOLOR_GREEN, + "屏显消息(OSD)背景RGB颜色 绿色") +MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_BGCOLOR_BLUE, + "屏显消息(OSD)背景RGB颜色 蓝色") +MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_BGCOLOR_OPACITY, + "屏显消息(OSD)背景透明度") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_DISABLE_KIOSK_MODE, - "Disable Kiosk Mode") + "关闭懒人模式") MSG_HASH(MENU_ENUM_SUBLABEL_MENU_DISABLE_KIOSK_MODE, - "Disables kiosk mode. A restart is required for the change to take full effect.") + "关闭懒人模式。重新启动后生效。") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_ENABLE_KIOSK_MODE, "开启懒人模式") MSG_HASH(MENU_ENUM_SUBLABEL_MENU_ENABLE_KIOSK_MODE, @@ -3284,16 +3472,24 @@ MSG_HASH(MSG_INPUT_KIOSK_MODE_PASSWORD_OK, "密码正确。") MSG_HASH(MSG_INPUT_KIOSK_MODE_PASSWORD_NOK, "密码错误。") +MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_COLOR_RED, + "屏显消息(OSD)RGB颜色 红色") +MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_COLOR_GREEN, + "屏显消息(OSD)RGB颜色 绿色") +MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_COLOR_BLUE, + "屏显消息(OSD)RGB颜色 蓝色") +MSG_HASH(MENU_ENUM_LABEL_VALUE_FRAMECOUNT_SHOW, + "显示FPS帧数") MSG_HASH(MENU_ENUM_LABEL_VALUE_AUTOMATICALLY_ADD_CONTENT_TO_PLAYLIST, - "Automatically add content to playlist") + "自动添加内容到游戏列表") MSG_HASH(MENU_ENUM_SUBLABEL_AUTOMATICALLY_ADD_CONTENT_TO_PLAYLIST, - "Automatically scans loaded content so they appear inside playlists.") + "自动扫描游戏文件,并添加在游戏列表中。") MSG_HASH(MSG_SCANNING_OF_FILE_FINISHED, "文件扫描完成") MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_RESAMPLER_QUALITY, "音频重采样质量") MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_RESAMPLER_QUALITY, - "Lower this value to favor performance/lower latency over audio quality, increase if you want better audio quality at the expense of performance/lower latency.") + "降低此值可以提高性能但会降低音频质量") MSG_HASH(MENU_ENUM_LABEL_VALUE_SHADER_WATCH_FOR_CHANGES, "Watch shader files for changes") MSG_HASH(MENU_ENUM_SUBLABEL_SHADER_WATCH_FOR_CHANGES, @@ -3310,7 +3506,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_RGUI_BORDER_FILLER_THICKNESS_ENABLE, "Enable border filler thickness") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_RGUI_BACKGROUND_FILLER_THICKNESS_ENABLE, "Enable background filler thickness") -MSG_HASH(MENU_ENUM_SUBLABEL_CRT_SWITCH_RESOLUTION, "For CRT displays only. Attempts to use exact core/game resolution and refresh rate.") +MSG_HASH(MENU_ENUM_SUBLABEL_CRT_SWITCH_RESOLUTION, "仅适用于 CRT 显示器。尽可能输出原汁原味的信号。") MSG_HASH(MENU_ENUM_LABEL_VALUE_CRT_SWITCH_RESOLUTION, "CRT 原生输出") MSG_HASH( MENU_ENUM_SUBLABEL_CRT_SWITCH_RESOLUTION_SUPER, @@ -3318,17 +3514,17 @@ MSG_HASH( ) MSG_HASH(MENU_ENUM_LABEL_VALUE_CRT_SWITCH_RESOLUTION_SUPER, "CRT Super Resolution") MSG_HASH(MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_REWIND, - "Show Rewind Settings") + "显示「回溯」设置") MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_SHOW_REWIND, - "Show/hide the Rewind options.") + "显示或隐藏「回溯」选项。") MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_SHOW_LATENCY, - "Show/hide the Latency options.") + "显示或隐藏「延迟」选项。") MSG_HASH(MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_LATENCY, - "Show Latency Settings") + "显示「延迟」设置") MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_SHOW_OVERLAYS, - "Show/hide the Overlay options.") + "显示或隐藏「图层」选项。") MSG_HASH(MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_OVERLAYS, - "Show Overlay Settings") + "显示「图层」设置") MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_ENABLE_MENU, "启用菜单声音") MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_ENABLE_MENU, @@ -3368,11 +3564,11 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MIXER_ACTION_STOP, MSG_HASH(MENU_ENUM_LABEL_VALUE_MIXER_ACTION_REMOVE, "Remove") MSG_HASH(MENU_ENUM_LABEL_VALUE_MIXER_ACTION_VOLUME, - "Volume") + "音量") MSG_HASH(MENU_ENUM_LABEL_VALUE_DETECT_CORE_LIST_OK_CURRENT_CORE, "Current core") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_MENU_SEARCH_CLEAR, - "Clear") + "清除") MSG_HASH(MENU_ENUM_LABEL_VALUE_DISCORD_IN_MENU, "In-Menu") MSG_HASH(MENU_ENUM_LABEL_VALUE_DISCORD_IN_GAME, @@ -3384,21 +3580,21 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_DISCORD_STATUS_PLAYING, MSG_HASH(MENU_ENUM_LABEL_VALUE_DISCORD_STATUS_PAUSED, "Paused") MSG_HASH(MENU_ENUM_LABEL_VALUE_DISCORD_ALLOW, - "Enable Discord") + "开启 Discord") MSG_HASH(MENU_ENUM_SUBLABEL_DISCORD_ALLOW, - "Enable or disable Discord support. Will not work with the browser version, only native desktop client.") + "启用或禁用 Discord 支持。仅支持本地桌面客户端。") MSG_HASH(MENU_ENUM_LABEL_VALUE_MIDI_INPUT, - "Input") + "输入") MSG_HASH(MENU_ENUM_SUBLABEL_MIDI_INPUT, - "Select input device.") + "选择输入设备。") MSG_HASH(MENU_ENUM_LABEL_VALUE_MIDI_OUTPUT, - "Output") + "输出") MSG_HASH(MENU_ENUM_SUBLABEL_MIDI_OUTPUT, - "Select output device.") + "选择输出设备。") MSG_HASH(MENU_ENUM_LABEL_VALUE_MIDI_VOLUME, - "Volume") + "音量") MSG_HASH(MENU_ENUM_SUBLABEL_MIDI_VOLUME, - "Set output volume (%).") + "设置输出音量(百分比)。") MSG_HASH(MENU_ENUM_LABEL_VALUE_POWER_MANAGEMENT_SETTINGS, "电源管理") MSG_HASH(MENU_ENUM_SUBLABEL_POWER_MANAGEMENT_SETTINGS, @@ -3433,10 +3629,10 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CRT_SWITCH_RESOLUTION_USE_CUSTOM_REFRESH_RATE, - "Use a custom refresh rate specified in the config file if needed.") + "使用配置文件中指定的自定义刷新率。") MSG_HASH( MENU_ENUM_LABEL_VALUE_CRT_SWITCH_RESOLUTION_USE_CUSTOM_REFRESH_RATE, - "Use Custom Refresh Rate") + "使用自定义刷新率") MSG_HASH( MENU_ENUM_SUBLABEL_CRT_SWITCH_RESOLUTION_OUTPUT_DISPLAY_ID, "Select the output port connected to the CRT display.") @@ -3517,7 +3713,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_STREAMING_TITLE, "Title of Stream") MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_SPLIT_JOYCON, - "拆下 Joy-Con" + "拆下 Joy-Con 手柄" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RESET_TO_DEFAULT_CONFIG, diff --git a/managers/cheat_manager.c b/managers/cheat_manager.c index d6cc891414..d581e4790d 100644 --- a/managers/cheat_manager.c +++ b/managers/cheat_manager.c @@ -108,7 +108,7 @@ void cheat_manager_set_code(unsigned i, const char *str) return; if (!string_is_empty(str)) - strcpy(cheat_manager_state.cheats[i].code,str) ; + strcpy(cheat_manager_state.cheats[i].code,str); cheat_manager_state.cheats[i].state = true; } @@ -151,7 +151,7 @@ bool cheat_manager_save(const char *path, const char *cheat_database, bool overw buf[0] = cheats_file[0] = '\0'; if ( (!cheat_manager_state.cheats) || cheat_manager_state.size==0 ) - return false ; + return false; if (!cheat_database) strlcpy(cheats_file, path, sizeof(cheats_file)); @@ -172,7 +172,7 @@ bool cheat_manager_save(const char *path, const char *cheat_database, bool overw if (!conf) return false; - conf->guaranteed_no_duplicates = true ; + conf->guaranteed_no_duplicates = true; config_set_int(conf, "cheats", cheat_manager_state.size); @@ -240,44 +240,42 @@ bool cheat_manager_copy_idx_to_working(unsigned idx) return false; } - memcpy(&(cheat_manager_state.working_cheat), &(cheat_manager_state.cheats[idx]), sizeof(struct item_cheat)) ; + memcpy(&(cheat_manager_state.working_cheat), &(cheat_manager_state.cheats[idx]), sizeof(struct item_cheat)); if ( cheat_manager_state.cheats[idx].desc != NULL ) - strlcpy(cheat_manager_state.working_desc, cheat_manager_state.cheats[idx].desc, CHEAT_DESC_SCRATCH_SIZE) ; + strlcpy(cheat_manager_state.working_desc, cheat_manager_state.cheats[idx].desc, CHEAT_DESC_SCRATCH_SIZE); else - cheat_manager_state.working_desc[0] = '\0' ; + cheat_manager_state.working_desc[0] = '\0'; if ( cheat_manager_state.cheats[idx].code != NULL ) - strlcpy(cheat_manager_state.working_code, cheat_manager_state.cheats[idx].code, CHEAT_CODE_SCRATCH_SIZE) ; + strlcpy(cheat_manager_state.working_code, cheat_manager_state.cheats[idx].code, CHEAT_CODE_SCRATCH_SIZE); else - cheat_manager_state.working_code[0] = '\0' ; + cheat_manager_state.working_code[0] = '\0'; - return true ; + return true; } bool cheat_manager_copy_working_to_idx(unsigned idx) { if ( (!cheat_manager_state.cheats) || (cheat_manager_state.size < idx+1)) - { return false; - } - memcpy(&(cheat_manager_state.cheats[idx]), &(cheat_manager_state.working_cheat), sizeof(struct item_cheat)) ; + memcpy(&(cheat_manager_state.cheats[idx]), &(cheat_manager_state.working_cheat), sizeof(struct item_cheat)); if ( cheat_manager_state.cheats[idx].desc != NULL ) - free(cheat_manager_state.cheats[idx].desc) ; + free(cheat_manager_state.cheats[idx].desc); - cheat_manager_state.cheats[idx].desc = strdup(cheat_manager_state.working_desc) ; + cheat_manager_state.cheats[idx].desc = strdup(cheat_manager_state.working_desc); if ( cheat_manager_state.cheats[idx].code != NULL ) - free(cheat_manager_state.cheats[idx].code) ; + free(cheat_manager_state.cheats[idx].code); - cheat_manager_state.cheats[idx].code = strdup(cheat_manager_state.working_code) ; - return true ; + cheat_manager_state.cheats[idx].code = strdup(cheat_manager_state.working_code); + return true; } static void cheat_manager_new(unsigned size) { unsigned i; - cheat_manager_free() ; + cheat_manager_free(); cheat_manager_state.buf_size = size; cheat_manager_state.size = size; @@ -290,66 +288,66 @@ static void cheat_manager_new(unsigned size) cheat_manager_state.buf_size = 0; cheat_manager_state.size = 0; cheat_manager_state.cheats = NULL; - return ; + return; } for (i = 0; i < cheat_manager_state.size; i++) { - cheat_manager_state.cheats[i].desc = NULL ; - cheat_manager_state.cheats[i].code = NULL ; + cheat_manager_state.cheats[i].desc = NULL; + cheat_manager_state.cheats[i].code = NULL; cheat_manager_state.cheats[i].state = false; cheat_manager_state.cheats[i].repeat_count = 1; cheat_manager_state.cheats[i].repeat_add_to_value = 0; cheat_manager_state.cheats[i].repeat_add_to_address = 1; } - return ; + return; } void cheat_manager_load_cb_first_pass(char *key, char *value) { - errno = 0 ; + errno = 0; if (string_is_equal(key, "cheats")) { cheat_manager_state.loading_cheat_size = (unsigned)strtoul(value, NULL, 0); if (errno != 0) - cheat_manager_state.loading_cheat_size = 0 ; + cheat_manager_state.loading_cheat_size = 0; } } void cheat_manager_load_cb_second_pass(char *key, char *value) { - char cheat_num_str[20] ; - unsigned cheat_num ; - unsigned cheat_idx ; - int idx = 0 ; - int key_length ; - errno = 0 ; + char cheat_num_str[20]; + unsigned cheat_num; + unsigned cheat_idx; + int idx = 0; + int key_length; + errno = 0; if (strncmp(key, "cheat", 5) != 0) - return ; + return; - idx = 5 ; - key_length = strlen(key) ; + idx = 5; + key_length = strlen(key); while (idx < key_length && key[idx] >= '0' && key[idx] <= '9' && idx < 24) { - cheat_num_str[idx-5] = key[idx] ; - idx++ ; + cheat_num_str[idx-5] = key[idx]; + idx++; } - cheat_num_str[idx-5] = '\0' ; + cheat_num_str[idx-5] = '\0'; - cheat_num = (unsigned)strtoul(cheat_num_str, NULL, 0); ; + cheat_num = (unsigned)strtoul(cheat_num_str, NULL, 0); if (cheat_num+cheat_manager_state.loading_cheat_offset >= cheat_manager_state.size) - return ; + return; - key = key+idx+1 ; + key = key+idx+1; - cheat_idx = cheat_num+cheat_manager_state.loading_cheat_offset ; + cheat_idx = cheat_num+cheat_manager_state.loading_cheat_offset; if (string_is_equal(key, "address")) cheat_manager_state.cheats[cheat_idx].address = (unsigned)strtoul(value, NULL, 0); @@ -360,9 +358,9 @@ void cheat_manager_load_cb_second_pass(char *key, char *value) else if (string_is_equal(key, "cheat_type")) cheat_manager_state.cheats[cheat_idx].cheat_type = (unsigned)strtoul(value, NULL, 0); else if (string_is_equal(key, "code")) - cheat_manager_state.cheats[cheat_idx].code = strdup(value) ; + cheat_manager_state.cheats[cheat_idx].code = strdup(value); else if (string_is_equal(key, "desc")) - cheat_manager_state.cheats[cheat_idx].desc = strdup(value) ; + cheat_manager_state.cheats[cheat_idx].desc = strdup(value); else if (string_is_equal(key, "enable")) cheat_manager_state.cheats[cheat_idx].state = (string_is_equal(value,"true") || string_is_equal(value,"1")); else if (string_is_equal(key, "handler")) @@ -396,65 +394,64 @@ void cheat_manager_load_cb_second_pass(char *key, char *value) bool cheat_manager_load(const char *path, bool append) { + unsigned orig_size; unsigned cheats = 0, i; - config_file_cb_t cb ; - cb.config_file_new_entry_cb = cheat_manager_load_cb_first_pass ; - config_file_t *conf = NULL ; - unsigned orig_size ; + config_file_cb_t cb; + config_file_t *conf = NULL; - cheat_manager_state.loading_cheat_size = 0 ; + cb.config_file_new_entry_cb = cheat_manager_load_cb_first_pass; + + cheat_manager_state.loading_cheat_size = 0; conf = config_file_new_with_callback(path, &cb); if (!conf) return false; - cheats = cheat_manager_state.loading_cheat_size ; + cheats = cheat_manager_state.loading_cheat_size; if (cheats == 0) goto error; - config_file_free(conf) ; - conf = NULL ; + config_file_free(conf); + conf = NULL; - cheat_manager_alloc_if_empty() ; + cheat_manager_alloc_if_empty(); if ( append ) { - orig_size = cheat_manager_get_size() ; + orig_size = cheat_manager_get_size(); if ( orig_size == 0) { cheat_manager_new(cheats); } else { - cheats = cheats + orig_size ; - if (cheat_manager_realloc(cheats, CHEAT_HANDLER_TYPE_EMU)) - { - } + cheats = cheats + orig_size; + if (cheat_manager_realloc(cheats, CHEAT_HANDLER_TYPE_EMU)) { } } } else { - orig_size = 0 ; + orig_size = 0; cheat_manager_new(cheats); } for (i = orig_size; i < cheats; i++) { - cheat_manager_state.cheats[i].idx = i ; - cheat_manager_state.cheats[i].desc = NULL ; - cheat_manager_state.cheats[i].code = NULL ; - cheat_manager_state.cheats[i].state = false ; - cheat_manager_state.cheats[i].big_endian = false ; - cheat_manager_state.cheats[i].cheat_type = CHEAT_TYPE_SET_TO_VALUE ; + cheat_manager_state.cheats[i].idx = i; + cheat_manager_state.cheats[i].desc = NULL; + cheat_manager_state.cheats[i].code = NULL; + cheat_manager_state.cheats[i].state = false; + cheat_manager_state.cheats[i].big_endian = false; + cheat_manager_state.cheats[i].cheat_type = CHEAT_TYPE_SET_TO_VALUE; cheat_manager_state.cheats[i].memory_search_size = 3; } - cheat_manager_state.loading_cheat_offset = orig_size ; - cb.config_file_new_entry_cb = cheat_manager_load_cb_second_pass ; + cheat_manager_state.loading_cheat_offset = orig_size; + cb.config_file_new_entry_cb = cheat_manager_load_cb_second_pass; conf = config_file_new_with_callback(path, &cb); if (!conf) @@ -473,26 +470,26 @@ error: bool cheat_manager_realloc(unsigned new_size, unsigned default_handler) { unsigned i; - unsigned orig_size ; + unsigned orig_size; if (!cheat_manager_state.cheats) { cheat_manager_state.cheats = (struct item_cheat*) calloc(new_size, sizeof(struct item_cheat)); - orig_size = 0 ; + orig_size = 0; } else { - orig_size = cheat_manager_state.size ; + orig_size = cheat_manager_state.size; /* if size is decreasing, free the items that will be lost */ for (i = new_size; i < orig_size; i++) { if ( cheat_manager_state.cheats[i].code != NULL ) - free(cheat_manager_state.cheats[i].code) ; + free(cheat_manager_state.cheats[i].code); if ( cheat_manager_state.cheats[i].desc != NULL ) - free(cheat_manager_state.cheats[i].desc) ; + free(cheat_manager_state.cheats[i].desc); } cheat_manager_state.cheats = (struct item_cheat*) @@ -511,14 +508,14 @@ bool cheat_manager_realloc(unsigned new_size, unsigned default_handler) for (i = orig_size; i < cheat_manager_state.size; i++) { - memset(&(cheat_manager_state.cheats[i]), 0, sizeof(cheat_manager_state.cheats[i])) ; - cheat_manager_state.cheats[i].state = false; - cheat_manager_state.cheats[i].handler = default_handler; - cheat_manager_state.cheats[i].cheat_type = CHEAT_TYPE_SET_TO_VALUE ; - cheat_manager_state.cheats[i].memory_search_size = 3; - cheat_manager_state.cheats[i].idx = i; - cheat_manager_state.cheats[i].repeat_count = 1; - cheat_manager_state.cheats[i].repeat_add_to_value = 0; + memset(&(cheat_manager_state.cheats[i]), 0, sizeof(cheat_manager_state.cheats[i])); + cheat_manager_state.cheats[i].state = false; + cheat_manager_state.cheats[i].handler = default_handler; + cheat_manager_state.cheats[i].cheat_type = CHEAT_TYPE_SET_TO_VALUE; + cheat_manager_state.cheats[i].memory_search_size = 3; + cheat_manager_state.cheats[i].idx = i; + cheat_manager_state.cheats[i].repeat_count = 1; + cheat_manager_state.cheats[i].repeat_add_to_value = 0; cheat_manager_state.cheats[i].repeat_add_to_address = 1; } @@ -527,37 +524,37 @@ bool cheat_manager_realloc(unsigned new_size, unsigned default_handler) void cheat_manager_free(void) { - unsigned i = 0 ; + unsigned i = 0; if (cheat_manager_state.cheats) { for (i = 0; i < cheat_manager_state.size; i++) { if ( cheat_manager_state.cheats[i].desc != NULL ) - free(cheat_manager_state.cheats[i].desc) ; + free(cheat_manager_state.cheats[i].desc); if ( cheat_manager_state.cheats[i].code != NULL ) - free(cheat_manager_state.cheats[i].code) ; + free(cheat_manager_state.cheats[i].code); } free(cheat_manager_state.cheats); } if ( cheat_manager_state.prev_memory_buf ) - free(cheat_manager_state.prev_memory_buf) ; + free(cheat_manager_state.prev_memory_buf); if ( cheat_manager_state.matches ) - free(cheat_manager_state.matches) ; + free(cheat_manager_state.matches); - cheat_manager_state.cheats = NULL ; - cheat_manager_state.size = 0 ; - cheat_manager_state.buf_size = 0 ; - cheat_manager_state.prev_memory_buf = NULL ; - cheat_manager_state.curr_memory_buf = NULL ; - cheat_manager_state.matches = NULL ; - cheat_manager_state.total_memory_size = 0 ; - cheat_manager_state.actual_memory_size = 0 ; - cheat_manager_state.memory_initialized = false ; - cheat_manager_state.memory_search_initialized = false ; + cheat_manager_state.cheats = NULL; + cheat_manager_state.size = 0; + cheat_manager_state.buf_size = 0; + cheat_manager_state.prev_memory_buf = NULL; + cheat_manager_state.curr_memory_buf = NULL; + cheat_manager_state.matches = NULL; + cheat_manager_state.total_memory_size = 0; + cheat_manager_state.actual_memory_size = 0; + cheat_manager_state.memory_initialized = false; + cheat_manager_state.memory_search_initialized = false; } @@ -587,7 +584,7 @@ void cheat_manager_toggle_index(unsigned i) cheat_manager_update(&cheat_manager_state, i); if (!settings) - return ; + return; if (settings->bools.apply_cheats_after_toggle) cheat_manager_apply_cheats(); @@ -656,18 +653,17 @@ bool cheat_manager_get_game_specific_filename(char * cheat_filename, size_t max_ struct retro_system_info system_info; if (!settings || !global || !cheat_filename) - return false ; + return false; if ( !core_get_system_info(&system_info) ) - return false ; - + return false; core_name = system_info.library_name; game_name = path_basename(global->name.cheatfile); if ( string_is_empty(settings->paths.path_cheat_database) || string_is_empty(core_name) || string_is_empty(game_name) ) - return false ; + return false; cheat_filename[0] = '\0'; strlcat(cheat_filename, settings->paths.path_cheat_database, max_length); @@ -680,23 +676,23 @@ bool cheat_manager_get_game_specific_filename(char * cheat_filename, size_t max_ strlcat(cheat_filename, game_name, max_length); - return true ; + return true; } void cheat_manager_load_game_specific_cheats() { - char cheat_file[PATH_MAX_LENGTH] ; + char cheat_file[PATH_MAX_LENGTH]; if (cheat_manager_get_game_specific_filename(cheat_file, PATH_MAX_LENGTH) ) - cheat_manager_load(cheat_file,true) ; + cheat_manager_load(cheat_file,true); } void cheat_manager_save_game_specific_cheats() { - char cheat_file[PATH_MAX_LENGTH] ; + char cheat_file[PATH_MAX_LENGTH]; if (cheat_manager_get_game_specific_filename(cheat_file, PATH_MAX_LENGTH) ) - cheat_manager_save(cheat_file, NULL, true) ; + cheat_manager_save(cheat_file, NULL, true); } @@ -707,11 +703,8 @@ void cheat_manager_state_free(void) bool cheat_manager_alloc_if_empty(void) { - if (!cheat_manager_state.cheats) - { cheat_manager_new(0); - } return true; } @@ -730,9 +723,8 @@ int cheat_manager_initialize_memory(rarch_setting_t *setting, bool wraparound) } if ( meminfo.size == 0 ) - { - return 0 ; - } + return 0; + cheat_manager_state.actual_memory_size = (unsigned)meminfo.size; cheat_manager_state.curr_memory_buf = meminfo.data; cheat_manager_state.total_memory_size = (unsigned)meminfo.size; @@ -786,84 +778,84 @@ static void cheat_manager_setup_search_meta(unsigned int bitsize, unsigned int * { case 0 : { - *bytes_per_item = 1 ; - *bits = 1 ; - *mask = 0x01 ; - break ; + *bytes_per_item = 1; + *bits = 1; + *mask = 0x01; + break; } case 1 : { - *bytes_per_item = 1 ; - *bits = 2 ; - *mask = 0x03 ; - break ; + *bytes_per_item = 1; + *bits = 2; + *mask = 0x03; + break; } case 2 : { - *bytes_per_item = 1 ; - *bits = 4 ; - *mask = 0x0F ; - break ; + *bytes_per_item = 1; + *bits = 4; + *mask = 0x0F; + break; } case 3 : { - *bytes_per_item = 1 ; - *bits = 8 ; - *mask = 0xFF ; - break ; + *bytes_per_item = 1; + *bits = 8; + *mask = 0xFF; + break; } case 4 : { - *bytes_per_item = 2 ; - *bits = 8 ; - *mask = 0xFFFF ; - break ; + *bytes_per_item = 2; + *bits = 8; + *mask = 0xFFFF; + break; } case 5 : { - *bytes_per_item = 4 ; - *bits = 8 ; - *mask = 0xFFFFFFFF ; - break ; + *bytes_per_item = 4; + *bits = 8; + *mask = 0xFFFFFFFF; + break; } } } int cheat_manager_search_exact(rarch_setting_t *setting, bool wraparound) { - return cheat_manager_search(CHEAT_SEARCH_TYPE_EXACT) ; + return cheat_manager_search(CHEAT_SEARCH_TYPE_EXACT); } int cheat_manager_search_lt(rarch_setting_t *setting, bool wraparound) { - return cheat_manager_search(CHEAT_SEARCH_TYPE_LT) ; + return cheat_manager_search(CHEAT_SEARCH_TYPE_LT); } int cheat_manager_search_gt(rarch_setting_t *setting, bool wraparound) { - return cheat_manager_search(CHEAT_SEARCH_TYPE_GT) ; + return cheat_manager_search(CHEAT_SEARCH_TYPE_GT); } int cheat_manager_search_lte(rarch_setting_t *setting, bool wraparound) { - return cheat_manager_search(CHEAT_SEARCH_TYPE_LTE) ; + return cheat_manager_search(CHEAT_SEARCH_TYPE_LTE); } int cheat_manager_search_gte(rarch_setting_t *setting, bool wraparound) { - return cheat_manager_search(CHEAT_SEARCH_TYPE_GTE) ; + return cheat_manager_search(CHEAT_SEARCH_TYPE_GTE); } int cheat_manager_search_eq(rarch_setting_t *setting, bool wraparound) { - return cheat_manager_search(CHEAT_SEARCH_TYPE_EQ) ; + return cheat_manager_search(CHEAT_SEARCH_TYPE_EQ); } int cheat_manager_search_neq(rarch_setting_t *setting, bool wraparound) { - return cheat_manager_search(CHEAT_SEARCH_TYPE_NEQ) ; + return cheat_manager_search(CHEAT_SEARCH_TYPE_NEQ); } int cheat_manager_search_eqplus(rarch_setting_t *setting, bool wraparound) { - return cheat_manager_search(CHEAT_SEARCH_TYPE_EQPLUS) ; + return cheat_manager_search(CHEAT_SEARCH_TYPE_EQPLUS); } int cheat_manager_search_eqminus(rarch_setting_t *setting, bool wraparound) { - return cheat_manager_search(CHEAT_SEARCH_TYPE_EQMINUS) ; + return cheat_manager_search(CHEAT_SEARCH_TYPE_EQMINUS); } int cheat_manager_search(enum cheat_search_type search_type) @@ -882,14 +874,14 @@ int cheat_manager_search(enum cheat_search_type search_type) if (!cheat_manager_state.curr_memory_buf) { runloop_msg_queue_push(msg_hash_to_str(MSG_CHEAT_SEARCH_NOT_INITIALIZED), 1, 180, true); - return 0 ; + return 0; } - cheat_manager_setup_search_meta(cheat_manager_state.search_bit_size, &bytes_per_item, &mask, &bits) ; + cheat_manager_setup_search_meta(cheat_manager_state.search_bit_size, &bytes_per_item, &mask, &bits); /* little endian FF000000 = 256 */ - for (idx = 0 ; idx < cheat_manager_state.total_memory_size ; idx = idx + bytes_per_item) + for (idx = 0; idx < cheat_manager_state.total_memory_size; idx = idx + bytes_per_item) { unsigned byte_part; @@ -899,73 +891,73 @@ int cheat_manager_search(enum cheat_search_type search_type) { curr_val = cheat_manager_state.big_endian ? (*(curr+idx)*256) + *(curr+idx+1) : - *(curr+idx) + (*(curr+idx+1)*256) ; + *(curr+idx) + (*(curr+idx+1)*256); prev_val = cheat_manager_state.big_endian ? (*(prev+idx)*256) + *(prev+idx+1) : - *(prev+idx) + (*(prev+idx+1)*256) ; - break ; + *(prev+idx) + (*(prev+idx+1)*256); + break; } case 4 : { curr_val = cheat_manager_state.big_endian ? (*(curr+idx)*256*256*256) + (*(curr+idx+1)*256*256) + (*(curr+idx+2)*256) + *(curr+idx+3) : - *(curr+idx) + (*(curr+idx+1)*256) + (*(curr+idx+2)*256*256) + (*(curr+idx+3)*256*256*256) ; + *(curr+idx) + (*(curr+idx+1)*256) + (*(curr+idx+2)*256*256) + (*(curr+idx+3)*256*256*256); prev_val = cheat_manager_state.big_endian ? (*(prev+idx)*256*256*256) + (*(prev+idx+1)*256*256) + (*(prev+idx+2)*256) + *(prev+idx+3) : - *(prev+idx) + (*(prev+idx+1)*256) + (*(prev+idx+2)*256*256) + (*(prev+idx+3)*256*256*256) ; - break ; + *(prev+idx) + (*(prev+idx+1)*256) + (*(prev+idx+2)*256*256) + (*(prev+idx+3)*256*256*256); + break; } case 1 : default : { - curr_val = *(curr+idx) ; - prev_val = *(prev+idx) ; - break ; + curr_val = *(curr+idx); + prev_val = *(prev+idx); + break; } } - for (byte_part = 0 ; byte_part < 8/bits ; byte_part++) + for (byte_part = 0; byte_part < 8/bits; byte_part++) { - unsigned int curr_subval = (curr_val >> (byte_part*bits) ) & mask ; - unsigned int prev_subval = (prev_val >> (byte_part*bits) ) & mask ; - unsigned int prev_match ; + unsigned int curr_subval = (curr_val >> (byte_part*bits) ) & mask; + unsigned int prev_subval = (prev_val >> (byte_part*bits) ) & mask; + unsigned int prev_match; if (bits < 8 ) - prev_match = *(cheat_manager_state.matches+idx) & (mask << (byte_part*bits)) ; + prev_match = *(cheat_manager_state.matches+idx) & (mask << (byte_part*bits)); else - prev_match = *(cheat_manager_state.matches+idx) ; + prev_match = *(cheat_manager_state.matches+idx); if (prev_match > 0) { - bool match = false ; + bool match = false; switch (search_type) { case CHEAT_SEARCH_TYPE_EXACT : - match = ( curr_subval == cheat_manager_state.search_exact_value) ; + match = ( curr_subval == cheat_manager_state.search_exact_value); break; case CHEAT_SEARCH_TYPE_LT : - match = ( curr_subval < prev_subval) ; + match = ( curr_subval < prev_subval); break; case CHEAT_SEARCH_TYPE_GT : - match = ( curr_subval > prev_subval) ; + match = ( curr_subval > prev_subval); break; case CHEAT_SEARCH_TYPE_LTE : - match = ( curr_subval <= prev_subval) ; + match = ( curr_subval <= prev_subval); break; case CHEAT_SEARCH_TYPE_GTE : - match = ( curr_subval >= prev_subval) ; + match = ( curr_subval >= prev_subval); break; case CHEAT_SEARCH_TYPE_EQ : - match = ( curr_subval == prev_subval) ; + match = ( curr_subval == prev_subval); break; case CHEAT_SEARCH_TYPE_NEQ : - match = ( curr_subval != prev_subval) ; + match = ( curr_subval != prev_subval); break; case CHEAT_SEARCH_TYPE_EQPLUS : - match = ( curr_subval == prev_subval+cheat_manager_state.search_eqplus_value) ; + match = ( curr_subval == prev_subval+cheat_manager_state.search_eqplus_value); break; case CHEAT_SEARCH_TYPE_EQMINUS : - match = ( curr_subval == prev_subval-cheat_manager_state.search_eqminus_value) ; + match = ( curr_subval == prev_subval-cheat_manager_state.search_eqminus_value); break; } if (!match ) @@ -974,9 +966,9 @@ int cheat_manager_search(enum cheat_search_type search_type) *(cheat_manager_state.matches+idx) = *(cheat_manager_state.matches+idx) & (( ~(mask << (byte_part*bits))) & 0xFF ); else - memset(cheat_manager_state.matches+idx,0,bytes_per_item) ; + memset(cheat_manager_state.matches+idx,0,bytes_per_item); if ( cheat_manager_state.num_matches > 0 ) - cheat_manager_state.num_matches-- ; + cheat_manager_state.num_matches--; } } } @@ -984,7 +976,7 @@ int cheat_manager_search(enum cheat_search_type search_type) memcpy(cheat_manager_state.prev_memory_buf, cheat_manager_state.curr_memory_buf, cheat_manager_state.actual_memory_size); - snprintf(msg, sizeof(msg), msg_hash_to_str(MSG_CHEAT_SEARCH_FOUND_MATCHES), cheat_manager_state.num_matches) ; + snprintf(msg, sizeof(msg), msg_hash_to_str(MSG_CHEAT_SEARCH_FOUND_MATCHES), cheat_manager_state.num_matches); msg[sizeof(msg) - 1] = 0; runloop_msg_queue_push(msg, 1, 180, true); @@ -993,7 +985,7 @@ int cheat_manager_search(enum cheat_search_type search_type) menu_entries_ctl(MENU_ENTRIES_CTL_SET_REFRESH, &refresh); menu_driver_ctl(RARCH_MENU_CTL_SET_PREVENT_POPULATE, NULL); #endif - return 0 ; + return 0; } bool cheat_manager_add_new_code(unsigned int memory_search_size, unsigned int address, unsigned int address_mask, @@ -1002,15 +994,15 @@ bool cheat_manager_add_new_code(unsigned int memory_search_size, unsigned int ad int new_size = cheat_manager_get_size() + 1; if ( !cheat_manager_realloc(new_size, CHEAT_HANDLER_TYPE_RETRO) ) - return false ; + return false; - cheat_manager_state.cheats[cheat_manager_state.size-1].address = address ; - cheat_manager_state.cheats[cheat_manager_state.size-1].address_mask = address_mask ; - cheat_manager_state.cheats[cheat_manager_state.size-1].memory_search_size = memory_search_size ; - cheat_manager_state.cheats[cheat_manager_state.size-1].value = value ; - cheat_manager_state.cheats[cheat_manager_state.size-1].big_endian = big_endian ; + cheat_manager_state.cheats[cheat_manager_state.size-1].address = address; + cheat_manager_state.cheats[cheat_manager_state.size-1].address_mask = address_mask; + cheat_manager_state.cheats[cheat_manager_state.size-1].memory_search_size = memory_search_size; + cheat_manager_state.cheats[cheat_manager_state.size-1].value = value; + cheat_manager_state.cheats[cheat_manager_state.size-1].big_endian = big_endian; - return true ; + return true; } int cheat_manager_add_matches(const char *path, const char *label, unsigned type, size_t menuidx, size_t entry_idx) @@ -1029,66 +1021,66 @@ int cheat_manager_add_matches(const char *path, if ( cheat_manager_state.num_matches + cheat_manager_state.size > 100 ) { runloop_msg_queue_push(msg_hash_to_str(MSG_CHEAT_SEARCH_ADDED_MATCHES_TOO_MANY), 1, 180, true); - return 0 ; + return 0; } - cheat_manager_setup_search_meta(cheat_manager_state.search_bit_size, &bytes_per_item, &mask, &bits) ; + cheat_manager_setup_search_meta(cheat_manager_state.search_bit_size, &bytes_per_item, &mask, &bits); - for (idx = 0 ; idx < cheat_manager_state.total_memory_size ; idx = idx + bytes_per_item) + for (idx = 0; idx < cheat_manager_state.total_memory_size; idx = idx + bytes_per_item) { switch ( bytes_per_item ) { case 2 : curr_val = cheat_manager_state.big_endian ? (*(curr+idx)*256) + *(curr+idx+1) : - *(curr+idx) + (*(curr+idx+1)*256) ; - break ; + *(curr+idx) + (*(curr+idx+1)*256); + break; case 4 : curr_val = cheat_manager_state.big_endian ? (*(curr+idx)*256*256*256) + (*(curr+idx+1)*256*256) + (*(curr+idx+2)*256) + *(curr+idx+3) : - *(curr+idx) + (*(curr+idx+1)*256) + (*(curr+idx+2)*256*256) + (*(curr+idx+3)*256*256*256) ; - break ; + *(curr+idx) + (*(curr+idx+1)*256) + (*(curr+idx+2)*256*256) + (*(curr+idx+3)*256*256*256); + break; case 1 : default : - curr_val = *(curr+idx) ; - break ; + curr_val = *(curr+idx); + break; } - for (byte_part = 0 ; byte_part < 8/bits ; byte_part++) + for (byte_part = 0; byte_part < 8/bits; byte_part++) { unsigned int prev_match; if (bits < 8 ) { - prev_match = *(cheat_manager_state.matches+idx) & (mask << (byte_part*bits)) ; + prev_match = *(cheat_manager_state.matches+idx) & (mask << (byte_part*bits)); if (prev_match) { if (!cheat_manager_add_new_code(cheat_manager_state.search_bit_size, idx, (mask << (byte_part*bits)), cheat_manager_state.big_endian, curr_val) ) { runloop_msg_queue_push(msg_hash_to_str(MSG_CHEAT_SEARCH_ADDED_MATCHES_FAIL), 1, 180, true); - return 0 ; + return 0; } - num_added++ ; + num_added++; } } else { - prev_match = *(cheat_manager_state.matches+idx) ; + prev_match = *(cheat_manager_state.matches+idx); if (prev_match) { if (!cheat_manager_add_new_code(cheat_manager_state.search_bit_size, idx, 0xFF, cheat_manager_state.big_endian, curr_val)) { runloop_msg_queue_push(msg_hash_to_str(MSG_CHEAT_SEARCH_ADDED_MATCHES_FAIL), 1, 180, true); - return 0 ; + return 0; } - num_added++ ; + num_added++; } } } } - snprintf(msg, sizeof(msg), msg_hash_to_str(MSG_CHEAT_SEARCH_ADDED_MATCHES_SUCCESS), cheat_manager_state.num_matches) ; + snprintf(msg, sizeof(msg), msg_hash_to_str(MSG_CHEAT_SEARCH_ADDED_MATCHES_SUCCESS), cheat_manager_state.num_matches); msg[sizeof(msg) - 1] = 0; runloop_msg_queue_push(msg, 1, 180, true); @@ -1110,38 +1102,38 @@ void cheat_manager_apply_rumble(struct item_cheat *cheat, unsigned int curr_valu case RUMBLE_TYPE_DISABLED: return; case RUMBLE_TYPE_CHANGES: - rumble = (curr_value != cheat->rumble_prev_value) ; - break ; + rumble = (curr_value != cheat->rumble_prev_value); + break; case RUMBLE_TYPE_DOES_NOT_CHANGE: - rumble = (curr_value == cheat->rumble_prev_value) ; - break ; + rumble = (curr_value == cheat->rumble_prev_value); + break; case RUMBLE_TYPE_INCREASE: - rumble = (curr_value > cheat->rumble_prev_value) ; - break ; + rumble = (curr_value > cheat->rumble_prev_value); + break; case RUMBLE_TYPE_DECREASE: - rumble = (curr_value < cheat->rumble_prev_value) ; - break ; + rumble = (curr_value < cheat->rumble_prev_value); + break; case RUMBLE_TYPE_EQ_VALUE: - rumble = (curr_value == cheat->rumble_value) ; - break ; + rumble = (curr_value == cheat->rumble_value); + break; case RUMBLE_TYPE_NEQ_VALUE: - rumble = (curr_value != cheat->rumble_value) ; - break ; + rumble = (curr_value != cheat->rumble_value); + break; case RUMBLE_TYPE_LT_VALUE: - rumble = (curr_value < cheat->rumble_value) ; - break ; + rumble = (curr_value < cheat->rumble_value); + break; case RUMBLE_TYPE_GT_VALUE: - rumble = (curr_value > cheat->rumble_value) ; + rumble = (curr_value > cheat->rumble_value); break; case RUMBLE_TYPE_INCREASE_BY_VALUE: - rumble = (curr_value == cheat->rumble_prev_value + cheat->rumble_value) ; - break ; + rumble = (curr_value == cheat->rumble_prev_value + cheat->rumble_value); + break; case RUMBLE_TYPE_DECREASE_BY_VALUE: - rumble = (curr_value == cheat->rumble_prev_value - cheat->rumble_value) ; - break ; + rumble = (curr_value == cheat->rumble_prev_value - cheat->rumble_value); + break; } - cheat->rumble_prev_value = curr_value ; + cheat->rumble_prev_value = curr_value; /* Give the emulator enough time * to initialize, load state, etc */ @@ -1149,15 +1141,15 @@ void cheat_manager_apply_rumble(struct item_cheat *cheat, unsigned int curr_valu { if (rumble) { - cheat->rumble_primary_end_time = cpu_features_get_time_usec() + (cheat->rumble_primary_duration*1000) ; - cheat->rumble_secondary_end_time = cpu_features_get_time_usec() + (cheat->rumble_secondary_duration*1000) ; + cheat->rumble_primary_end_time = cpu_features_get_time_usec() + (cheat->rumble_primary_duration*1000); + cheat->rumble_secondary_end_time = cpu_features_get_time_usec() + (cheat->rumble_secondary_duration*1000); input_driver_set_rumble_state(cheat->rumble_port, RETRO_RUMBLE_STRONG, cheat->rumble_primary_strength); input_driver_set_rumble_state(cheat->rumble_port, RETRO_RUMBLE_WEAK, cheat->rumble_secondary_strength); } } else { - cheat->rumble_initialized++ ; + cheat->rumble_initialized++; return; } @@ -1176,7 +1168,7 @@ void cheat_manager_apply_rumble(struct item_cheat *cheat, unsigned int curr_valu { if (cheat->rumble_secondary_end_time != 0) input_driver_set_rumble_state(cheat->rumble_port, RETRO_RUMBLE_WEAK, 0); - cheat->rumble_secondary_end_time = 0 ; + cheat->rumble_secondary_end_time = 0; } else { @@ -1196,19 +1188,19 @@ void cheat_manager_apply_retro_cheats(void) if ((!cheat_manager_state.cheats)) return; - for (i = 0 ; i < cheat_manager_state.size ; i++ ) + for (i = 0; i < cheat_manager_state.size; i++ ) { unsigned char *curr; unsigned int idx; bool set_value = false; unsigned int value_to_set = 0; - unsigned int repeat_iter = 0 ; - unsigned int address_mask = cheat_manager_state.cheats[i].address_mask ; + unsigned int repeat_iter = 0; + unsigned int address_mask = cheat_manager_state.cheats[i].address_mask; if (cheat_manager_state.cheats[i].handler != CHEAT_HANDLER_TYPE_RETRO || !cheat_manager_state.cheats[i].state) - continue ; + continue; if (!cheat_manager_state.memory_initialized) - cheat_manager_initialize_memory(NULL, false) ; + cheat_manager_initialize_memory(NULL, false); /* If we're still not initialized, something * must have gone wrong - just bail */ @@ -1217,13 +1209,13 @@ void cheat_manager_apply_retro_cheats(void) if (!run_cheat) { - run_cheat = true ; - continue ; + run_cheat = true; + continue; } - cheat_manager_setup_search_meta(cheat_manager_state.cheats[i].memory_search_size, &bytes_per_item, &mask, &bits) ; + cheat_manager_setup_search_meta(cheat_manager_state.cheats[i].memory_search_size, &bytes_per_item, &mask, &bits); - curr = cheat_manager_state.curr_memory_buf ; - idx = cheat_manager_state.cheats[i].address ; + curr = cheat_manager_state.curr_memory_buf; + idx = cheat_manager_state.cheats[i].address; switch (bytes_per_item) { @@ -1231,142 +1223,142 @@ void cheat_manager_apply_retro_cheats(void) { curr_val = cheat_manager_state.big_endian ? (*(curr+idx)*256) + *(curr+idx+1) : - *(curr+idx) + (*(curr+idx+1)*256) ; - break ; + *(curr+idx) + (*(curr+idx+1)*256); + break; } case 4 : { curr_val = cheat_manager_state.big_endian ? (*(curr+idx)*256*256*256) + (*(curr+idx+1)*256*256) + (*(curr+idx+2)*256) + *(curr+idx+3) : - *(curr+idx) + (*(curr+idx+1)*256) + (*(curr+idx+2)*256*256) + (*(curr+idx+3)*256*256*256) ; - break ; + *(curr+idx) + (*(curr+idx+1)*256) + (*(curr+idx+2)*256*256) + (*(curr+idx+3)*256*256*256); + break; } case 1 : default : { - curr_val = *(curr+idx) ; - break ; + curr_val = *(curr+idx); + break; } } - cheat_manager_apply_rumble(&cheat_manager_state.cheats[i], curr_val) ; + cheat_manager_apply_rumble(&cheat_manager_state.cheats[i], curr_val); switch (cheat_manager_state.cheats[i].cheat_type ) { case CHEAT_TYPE_SET_TO_VALUE : - set_value = true ; - value_to_set = cheat_manager_state.cheats[i].value ; - break ; + set_value = true; + value_to_set = cheat_manager_state.cheats[i].value; + break; case CHEAT_TYPE_INCREASE_VALUE: - set_value = true ; - value_to_set = curr_val + cheat_manager_state.cheats[i].value ; + set_value = true; + value_to_set = curr_val + cheat_manager_state.cheats[i].value; break; case CHEAT_TYPE_DECREASE_VALUE: - set_value = true ; - value_to_set = curr_val - cheat_manager_state.cheats[i].value ; + set_value = true; + value_to_set = curr_val - cheat_manager_state.cheats[i].value; break; case CHEAT_TYPE_RUN_NEXT_IF_EQ: if (!(curr_val == cheat_manager_state.cheats[i].value)) - run_cheat = false ; + run_cheat = false; break; case CHEAT_TYPE_RUN_NEXT_IF_NEQ: if (!(curr_val != cheat_manager_state.cheats[i].value )) - run_cheat = false ; + run_cheat = false; break; case CHEAT_TYPE_RUN_NEXT_IF_LT: if (!(cheat_manager_state.cheats[i].value < curr_val)) - run_cheat = false ; + run_cheat = false; break; case CHEAT_TYPE_RUN_NEXT_IF_GT: if (!(cheat_manager_state.cheats[i].value > curr_val)) - run_cheat = false ; + run_cheat = false; break; } if (set_value) { - for ( repeat_iter = 1 ; repeat_iter <= cheat_manager_state.cheats[i].repeat_count ; repeat_iter++) + for ( repeat_iter = 1; repeat_iter <= cheat_manager_state.cheats[i].repeat_count; repeat_iter++) { switch (bytes_per_item) { case 2 : if (cheat_manager_state.cheats[i].big_endian) { - *(curr+idx) = (value_to_set >> 8) & 0xFF ; - *(curr+idx+1) = value_to_set & 0xFF ; + *(curr+idx) = (value_to_set >> 8) & 0xFF; + *(curr+idx+1) = value_to_set & 0xFF; } else { - *(curr+idx) = value_to_set & 0xFF ; - *(curr+idx+1) = (value_to_set >> 8) & 0xFF ; + *(curr+idx) = value_to_set & 0xFF; + *(curr+idx+1) = (value_to_set >> 8) & 0xFF; } - break ; + break; case 4 : if (cheat_manager_state.cheats[i].big_endian) { - *(curr+idx) = (value_to_set >> 24) & 0xFF ; - *(curr+idx+1) = (value_to_set >> 16) & 0xFF ; - *(curr+idx+2) = (value_to_set >> 8) & 0xFF ; - *(curr+idx+3) = value_to_set & 0xFF ; + *(curr+idx) = (value_to_set >> 24) & 0xFF; + *(curr+idx+1) = (value_to_set >> 16) & 0xFF; + *(curr+idx+2) = (value_to_set >> 8) & 0xFF; + *(curr+idx+3) = value_to_set & 0xFF; } else { - *(curr+idx) = value_to_set & 0xFF ; - *(curr+idx+1) = (value_to_set >> 8) & 0xFF ; - *(curr+idx+2) = (value_to_set >> 16) & 0xFF ; - *(curr+idx+3) = (value_to_set >> 24) & 0xFF ; + *(curr+idx) = value_to_set & 0xFF; + *(curr+idx+1) = (value_to_set >> 8) & 0xFF; + *(curr+idx+2) = (value_to_set >> 16) & 0xFF; + *(curr+idx+3) = (value_to_set >> 24) & 0xFF; } - break ; + break; case 1 : if (bits < 8) { unsigned bitpos; unsigned char val = *(curr+idx); - for (bitpos = 0 ; bitpos < 8 ; bitpos++) + for (bitpos = 0; bitpos < 8; bitpos++) { if ((address_mask>>bitpos)&0x01 ) { - mask = (~(1<>bitpos)&0x01)<>bitpos)&0x01)< cheat_manager_state.num_matches-1) @@ -1395,57 +1387,57 @@ void cheat_manager_match_action(enum cheat_match_action_type match_action, unsig cheat_manager_setup_search_meta(cheat_manager_state.search_bit_size, &bytes_per_item, &mask, &bits); if (match_action == CHEAT_MATCH_ACTION_TYPE_BROWSE) - start_idx = *address ; + start_idx = *address; else - start_idx = 0 ; + start_idx = 0; - for (idx = start_idx ; idx < cheat_manager_state.total_memory_size ; idx = idx + bytes_per_item) + for (idx = start_idx; idx < cheat_manager_state.total_memory_size; idx = idx + bytes_per_item) { switch (bytes_per_item ) { case 2 : curr_val = cheat_manager_state.big_endian ? (*(curr+idx)*256) + *(curr+idx+1) : - *(curr+idx) + (*(curr+idx+1)*256) ; + *(curr+idx) + (*(curr+idx+1)*256); if (prev != NULL) prev_val = cheat_manager_state.big_endian ? (*(prev+idx)*256) + *(prev+idx+1) : - *(prev+idx) + (*(prev+idx+1)*256) ; - break ; + *(prev+idx) + (*(prev+idx+1)*256); + break; case 4 : curr_val = cheat_manager_state.big_endian ? (*(curr+idx)*256*256*256) + (*(curr+idx+1)*256*256) + (*(curr+idx+2)*256) + *(curr+idx+3) : - *(curr+idx) + (*(curr+idx+1)*256) + (*(curr+idx+2)*256*256) + (*(curr+idx+3)*256*256*256) ; + *(curr+idx) + (*(curr+idx+1)*256) + (*(curr+idx+2)*256*256) + (*(curr+idx+3)*256*256*256); if (prev != NULL) prev_val = cheat_manager_state.big_endian ? (*(prev+idx)*256*256*256) + (*(prev+idx+1)*256*256) + (*(prev+idx+2)*256) + *(prev+idx+3) : - *(prev+idx) + (*(prev+idx+1)*256) + (*(prev+idx+2)*256*256) + (*(prev+idx+3)*256*256*256) ; - break ; + *(prev+idx) + (*(prev+idx+1)*256) + (*(prev+idx+2)*256*256) + (*(prev+idx+3)*256*256*256); + break; case 1 : default : - curr_val = *(curr+idx) ; + curr_val = *(curr+idx); if (prev != NULL) - prev_val = *(prev+idx) ; - break ; + prev_val = *(prev+idx); + break; } if (match_action == CHEAT_MATCH_ACTION_TYPE_BROWSE) { *curr_value = curr_val; *prev_value = prev_val; - return ; + return; } if (!prev) return; - for (byte_part = 0 ; byte_part < 8/bits ; byte_part++) + for (byte_part = 0; byte_part < 8/bits; byte_part++) { - unsigned int prev_match ; + unsigned int prev_match; if (bits < 8 ) { - prev_match = *(cheat_manager_state.matches+idx) & (mask << (byte_part*bits)) ; + prev_match = *(cheat_manager_state.matches+idx) & (mask << (byte_part*bits)); if (prev_match) { if (target_match_idx == curr_match_idx) @@ -1453,12 +1445,12 @@ void cheat_manager_match_action(enum cheat_match_action_type match_action, unsig switch (match_action) { case CHEAT_MATCH_ACTION_TYPE_BROWSE : - return ; + return; case CHEAT_MATCH_ACTION_TYPE_VIEW : - *address = idx ; - *address_mask = (mask << (byte_part*bits)) ; - *curr_value = curr_val ; - *prev_value = prev_val ; + *address = idx; + *address_mask = (mask << (byte_part*bits)); + *curr_value = curr_val; + *prev_value = prev_val; return; case CHEAT_MATCH_ACTION_TYPE_COPY : if (!cheat_manager_add_new_code(cheat_manager_state.search_bit_size, idx, (mask << (byte_part*bits)), @@ -1466,26 +1458,26 @@ void cheat_manager_match_action(enum cheat_match_action_type match_action, unsig runloop_msg_queue_push(msg_hash_to_str(MSG_CHEAT_SEARCH_ADD_MATCH_FAIL), 1, 180, true); else runloop_msg_queue_push(msg_hash_to_str(MSG_CHEAT_SEARCH_ADD_MATCH_SUCCESS), 1, 180, true); - return ; + return; case CHEAT_MATCH_ACTION_TYPE_DELETE : if (bits < 8) *(cheat_manager_state.matches+idx) = *(cheat_manager_state.matches+idx) & (( ~(mask << (byte_part*bits))) & 0xFF ); else - memset(cheat_manager_state.matches+idx,0,bytes_per_item) ; + memset(cheat_manager_state.matches+idx,0,bytes_per_item); if ( cheat_manager_state.num_matches > 0 ) - cheat_manager_state.num_matches-- ; + cheat_manager_state.num_matches--; runloop_msg_queue_push(msg_hash_to_str(MSG_CHEAT_SEARCH_DELETE_MATCH_SUCCESS), 1, 180, true); return; } return; } - curr_match_idx++ ; + curr_match_idx++; } } else { - prev_match = *(cheat_manager_state.matches+idx) ; + prev_match = *(cheat_manager_state.matches+idx); if (prev_match) { if (target_match_idx == curr_match_idx) @@ -1493,33 +1485,33 @@ void cheat_manager_match_action(enum cheat_match_action_type match_action, unsig switch (match_action) { case CHEAT_MATCH_ACTION_TYPE_BROWSE : - return ; + return; case CHEAT_MATCH_ACTION_TYPE_VIEW : - *address = idx ; - *address_mask = 0xFF ; - *curr_value = curr_val ; - *prev_value = prev_val ; - return ; + *address = idx; + *address_mask = 0xFF; + *curr_value = curr_val; + *prev_value = prev_val; + return; case CHEAT_MATCH_ACTION_TYPE_COPY : if ( !cheat_manager_add_new_code(cheat_manager_state.search_bit_size, idx, 0xFF, cheat_manager_state.big_endian, curr_val) ) runloop_msg_queue_push(msg_hash_to_str(MSG_CHEAT_SEARCH_ADD_MATCH_FAIL), 1, 180, true); else runloop_msg_queue_push(msg_hash_to_str(MSG_CHEAT_SEARCH_ADD_MATCH_SUCCESS), 1, 180, true); - return ; + return; case CHEAT_MATCH_ACTION_TYPE_DELETE : if ( bits < 8 ) *(cheat_manager_state.matches+idx) = *(cheat_manager_state.matches+idx) & (( ~(mask << (byte_part*bits))) & 0xFF ); else - memset(cheat_manager_state.matches+idx,0,bytes_per_item) ; + memset(cheat_manager_state.matches+idx,0,bytes_per_item); if ( cheat_manager_state.num_matches > 0 ) - cheat_manager_state.num_matches-- ; + cheat_manager_state.num_matches--; runloop_msg_queue_push(msg_hash_to_str(MSG_CHEAT_SEARCH_DELETE_MATCH_SUCCESS), 1, 180, true); - return ; + return; } } - curr_match_idx++ ; + curr_match_idx++; } } @@ -1529,8 +1521,8 @@ void cheat_manager_match_action(enum cheat_match_action_type match_action, unsig int cheat_manager_copy_match(rarch_setting_t *setting, bool wraparound) { cheat_manager_match_action(CHEAT_MATCH_ACTION_TYPE_COPY, - cheat_manager_state.match_idx, NULL, NULL, NULL, NULL) ; - return 0 ; + cheat_manager_state.match_idx, NULL, NULL, NULL, NULL); + return 0; } int cheat_manager_delete_match(rarch_setting_t *setting, bool wraparound) diff --git a/menu/drivers_display/menu_display_gdi.c b/menu/drivers_display/menu_display_gdi.c index 5fa746fb06..e4b2f1f746 100644 --- a/menu/drivers_display/menu_display_gdi.c +++ b/menu/drivers_display/menu_display_gdi.c @@ -16,17 +16,20 @@ #include +#include #include #include #include "../../config.def.h" #include "../../gfx/font_driver.h" #include "../../gfx/video_driver.h" +#include "../../verbosity.h" #include "../menu_driver.h" #if defined(_WIN32) && !defined(_XBOX) #include "../../gfx/common/win32_common.h" +#include "../../gfx/common/gdi_common.h" #endif static void *menu_display_gdi_get_default_mvp(video_frame_info_t *video_info) @@ -45,6 +48,68 @@ static void menu_display_gdi_blend_end(video_frame_info_t *video_info) static void menu_display_gdi_draw(menu_display_ctx_draw_t *draw, video_frame_info_t *video_info) { + struct gdi_texture *texture = NULL; + gdi_t *gdi = (gdi_t*)video_driver_get_ptr(false); + BITMAPINFO info = {0}; + + if (!gdi || !draw || draw->x < 0 || draw->y < 0 || draw->width <= 1 || draw->height <= 1) + return; + + texture = (struct gdi_texture*)draw->texture; + + if (!texture || texture->width <= 1 || texture->height <= 1) + return; + + info.bmiHeader.biBitCount = 32; + info.bmiHeader.biWidth = texture->width; + info.bmiHeader.biHeight = -texture->height; + info.bmiHeader.biPlanes = 1; + info.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); + info.bmiHeader.biSizeImage = 0; + info.bmiHeader.biCompression = BI_RGB; + + if (gdi->memDC) + { +#if _WIN32_WINNT >= 0x0410 /* Win98 */ + BLENDFUNCTION blend = {0}; +#endif + + if (!gdi->texDC) + gdi->texDC = CreateCompatibleDC(gdi->winDC); + + if (texture->bmp) + { + texture->bmp_old = SelectObject(gdi->texDC, texture->bmp); + } + else + { + /* scale texture data into a bitmap we can easily blit later */ + texture->bmp = CreateCompatibleBitmap(gdi->winDC, draw->width, draw->height); + texture->bmp_old = SelectObject(gdi->texDC, texture->bmp); + + StretchDIBits(gdi->texDC, 0, 0, draw->width, draw->height, 0, 0, texture->width, texture->height, texture->data, &info, DIB_RGB_COLORS, SRCCOPY); + } + + gdi->bmp_old = SelectObject(gdi->memDC, gdi->bmp); + +#if _WIN32_WINNT >= 0x0410 /* Win98 */ + blend.BlendOp = AC_SRC_OVER; + blend.BlendFlags = 0; + blend.SourceConstantAlpha = 255;/*clamp_8bit(draw->coords->color[3] * 255.0f);*/ + blend.AlphaFormat = AC_SRC_ALPHA; + + /* AlphaBlend() is only available since Win98 */ + AlphaBlend(gdi->memDC, draw->x, video_info->height - draw->height - draw->y, draw->width, draw->height, gdi->texDC, 0, 0, draw->width, draw->height, blend); + /*TransparentBlt(gdi->memDC, draw->x, video_info->height - draw->height - draw->y, draw->width, draw->height, gdi->texDC, 0, 0, draw->width, draw->height, 0);*/ +#else + /* Just draw without the blending */ + StretchBlt(gdi->memDC, draw->x, video_info->height - draw->height - draw->y, draw->width, draw->height, gdi->texDC, 0, 0, draw->width, draw->height, SRCCOPY); + +#endif + + SelectObject(gdi->memDC, gdi->bmp_old); + SelectObject(gdi->texDC, texture->bmp_old); + } } static void menu_display_gdi_draw_pipeline(menu_display_ctx_draw_t *draw, @@ -80,7 +145,7 @@ static bool menu_display_gdi_font_init_first( font_path, font_size, true, is_threaded, FONT_DRIVER_RENDER_GDI))) - return false; + return false; return true; }