===========================================================================
| 3116 | |
| 3117 | //=========================================================================== |
| 3118 | Update_t CmdConfigDisasm (int nArgs) |
| 3119 | { |
| 3120 | int iParam = 0; |
| 3121 | |
| 3122 | bool bDisplayCurrentSettings = false; |
| 3123 | |
| 3124 | // if (! strcmp( g_aArgs[ 1 ].sArg, g_aParameters[ PARAM_WILDSTAR ].m_sName )) |
| 3125 | if (! nArgs) |
| 3126 | { |
| 3127 | bDisplayCurrentSettings = true; |
| 3128 | nArgs = PARAM_CONFIG_NUM; |
| 3129 | } |
| 3130 | else |
| 3131 | { |
| 3132 | if (nArgs > 2) |
| 3133 | return Help_Arg_1( CMD_CONFIG_DISASM ); |
| 3134 | } |
| 3135 | |
| 3136 | for (int iArg = 1; iArg <= nArgs; iArg++ ) |
| 3137 | { |
| 3138 | if (bDisplayCurrentSettings) |
| 3139 | iParam = _PARAM_CONFIG_BEGIN + iArg - 1; |
| 3140 | else |
| 3141 | if (FindParam( g_aArgs[iArg].sArg, MATCH_FUZZY, iParam )) |
| 3142 | { |
| 3143 | } |
| 3144 | |
| 3145 | switch (iParam) |
| 3146 | { |
| 3147 | case PARAM_CONFIG_BRANCH: |
| 3148 | if ((nArgs > 1) && (! bDisplayCurrentSettings)) // set |
| 3149 | { |
| 3150 | iArg++; |
| 3151 | g_iConfigDisasmBranchType = g_aArgs[ iArg ].nValue; |
| 3152 | if (g_iConfigDisasmBranchType < 0) |
| 3153 | g_iConfigDisasmBranchType = 0; |
| 3154 | if (g_iConfigDisasmBranchType >= NUM_DISASM_BRANCH_TYPES) |
| 3155 | g_iConfigDisasmBranchType = NUM_DISASM_BRANCH_TYPES - 1; |
| 3156 | |
| 3157 | } |
| 3158 | else // show current setting |
| 3159 | { |
| 3160 | ConsoleBufferPushFormat( "Branch Type: %d", g_iConfigDisasmBranchType ); |
| 3161 | ConsoleBufferToDisplay(); |
| 3162 | } |
| 3163 | break; |
| 3164 | |
| 3165 | case PARAM_CONFIG_CLICK: // GH#462 |
| 3166 | if ((nArgs > 1) && (! bDisplayCurrentSettings)) // set |
| 3167 | { |
| 3168 | iArg++; |
| 3169 | g_bConfigDisasmClick = (g_aArgs[ iArg ].nValue) & 7; // MAGIC NUMBER |
| 3170 | } |
| 3171 | // else // Always show current setting -- TODO: Fix remaining disasm to show current setting when set |
| 3172 | { |
| 3173 | const char *aClickKey[8] = |
| 3174 | { |
| 3175 | "" // 0 |
nothing calls this directly
no test coverage detected