Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dotfuscator removing Windows Phone 7 language support?

The XNA game that I am working on for WP7 supports multiple languages. However, something seems to be happening during the obfuscation process which seems to cause the language to always be set to English (the default language, in this case), at least according to the Resource class.

For example, each resource pack contains the following definition:

RESOURCE_IDX  ->  #

And each resource pack is given a different #. In an un-obfuscated build, the correct index is pulled out based on the device's current language. However once obfuscation occurs, the Resource class automatically selects the value associated with English even if the device is set to Spanish.

Is there a setting that I'm missing in the obfuscation process that is causing this?

like image 859
themarshal Avatar asked Aug 09 '11 17:08

themarshal


1 Answers

It would appear that my issue was related to the renaming of the Resource class. That class is simply a set of auto-generated getters based on the contents of the resource packs. Somehow, subjecting that class to renaming during obfuscation caused the improper value to be returned (I won't speculate on why).

Once I prevented that class from being renamed, the rest of the application worked as expected.

like image 60
themarshal Avatar answered Sep 30 '22 18:09

themarshal