---
- feature, checkbox state based on feature variables
-  currently has side effect of breaking exception handler in this function

SnesPatcher.frmSnesPatcher.btnSelectPath_Click

-62	this.lstOptions.Items.Add(text, true);

	CheckState check = CheckState.Unchecked;
	if (this.zpsPatch.dicOptions[text].bActive)
	{
		check = CheckState.Checked;
	}
	if (this.zpsPatch.dicOptions[text].iDevProgress == 0)
	{
		check = CheckState.Indeterminate;
	}
	this.lstOptions.Items.Add(text, check);

	// ((IDisposable)enumerator).Dispose();

	// CheckState check = CheckState.Unchecked;
	IL_019c: ldc.i4.0
	IL_019d: stloc.s 9
	// if (zpsPatch.dicOptions[key].bActive)
	IL_019f: ldarg.0
	IL_01a0: ldfld class [lib_RomHacking]libSnesAssembler.AsmPatch SnesPatcher.frmSnesPatcher::zpsPatch
	IL_01a5: ldfld class [mscorlib]System.Collections.Generic.Dictionary`2<string, class libSnesAssembler.PatchOption> libSnesAssembler.AsmPatch::dicOptions
	IL_01aa: ldloc.s 6
	IL_01ab: callvirt instance !1 class [mscorlib]System.Collections.Generic.Dictionary`2<string, class libSnesAssembler.PatchOption>::get_Item(!0)
	IL_01b0: ldfld bool [lib_RomHacking]libSnesAssembler.PatchOption::bActive
	// (no C# code)
	IL_01b5: brfalse.s IL_01ba

	// check = CheckState.Checked;
	IL_01b7: ldc.i4.1
	IL_01b8: stloc.s 9

	// if (zpsPatch.dicOptions[key].iDevProgress == 0)
	IL_01ba: ldarg.0
	IL_01bb: ldfld class [lib_RomHacking]libSnesAssembler.AsmPatch SnesPatcher.frmSnesPatcher::zpsPatch
	IL_01c0: ldfld class [mscorlib]System.Collections.Generic.Dictionary`2<string, class libSnesAssembler.PatchOption> libSnesAssembler.AsmPatch::dicOptions
	IL_01c5: ldloc.s 6
	IL_01c6: callvirt instance !1 class [mscorlib]System.Collections.Generic.Dictionary`2<string, class libSnesAssembler.PatchOption>::get_Item(!0)
	IL_01cb: ldfld int32 [lib_RomHacking]libSnesAssembler.PatchOption::iDevProgress
	// (no C# code)
	IL_01d0: brtrue.s IL_01d5

	// check = CheckState.Indeterminate;
	IL_01d2: ldc.i4.2
	IL_01d3: stloc.s 9

	// lstOptions.Items.Add(key, check);
	IL_01d5: ldarg.0
	IL_01d6: callvirt instance class [System.Windows.Forms]System.Windows.Forms.CheckedListBox SnesPatcher.frmSnesPatcher::get_lstOptions()
	IL_01db: callvirt instance class [System.Windows.Forms]System.Windows.Forms.CheckedListBox/ObjectCollection [System.Windows.Forms]System.Windows.Forms.CheckedListBox::get_Items()
	IL_01e0: ldloc.s 6

	IL_01e1: ldloc.s 9
	IL_01e3: callvirt instance int32 [System.Windows.Forms]System.Windows.Forms.CheckedListBox/ObjectCollection::Add(object, valuetype [System.Windows.Forms]System.Windows.Forms.CheckState)

	IL_01e8: pop

- simpler

	this.lstOptions.Items.Add(text, this.zpsPatch.dicOptions[text].bActive);

-159	01DE	ldc.i4.1

+159	01DE	ldarg.0
+160	01DF	ldfld		class [lib_RomHacking]libSnesAssembler.AsmPatch SnesPatcher.frmSnesPatcher::zpsPatch
+161	01E4	ldfld		class [mscorlib]System.Collections.Generic.Dictionary`2<string, class libSnesAssembler.PatchOption> libSnesAssembler.AsmPatch::dicOptions
+162	01E9	ldloc.s		V_6 (6)
+163	01EB	callvirt	instance !1 class [mscorlib]System.Collections.Generic.Dictionary`2<string, class libSnesAssembler.PatchOption>::get_Item(!0)
+164	01F0	ldfld		bool [lib_RomHacking]libSnesAssembler.PatchOption::bActive

 165	01F5	callvirt	instance int32 [System.Windows.Forms]System.Windows.Forms.CheckedListBox/ObjectCollection::Add(object, bool)

- doesn't work, returns an index, not a handle
- and listbox checkboxes don't have an enabled trait anyway

-166	01FA	pop

+166	01FA	ldarg.0
+167	01FB	ldfld		class [lib_RomHacking]libSnesAssembler.AsmPatch SnesPatcher.frmSnesPatcher::zpsPatch
+168	0200	ldfld		class [mscorlib]System.Collections.Generic.Dictionary`2<string, class libSnesAssembler.PatchOption> libSnesAssembler.AsmPatch::dicOptions
+169	0205	ldloc.s		V_6 (6)
+170	0207	callvirt	instance !1 class [mscorlib]System.Collections.Generic.Dictionary`2<string, class libSnesAssembler.PatchOption>::get_Item(!0)
+171	020C	ldfld		int32 [lib_RomHacking]libSnesAssembler.PatchOption::iDevProgress

+172	0211	callvirt	instance void [System.Windows.Forms]System.Windows.Forms.Control::set_Enabled(bool)

---
- feature, locks indeterminate state to fake disabled state

SnesPatcher.frmSnesPatcher.lstOptions_ItemCheck

	if (e.CurrentValue == CheckState.Indeterminate)
	{
		e.NewValue = CheckState.Indeterminate;
		return;
	}

	// if (e.CurrentValue == CheckState.Indeterminate)
	IL_0000: ldarg.2
	IL_0001: callvirt instance valuetype [System.Windows.Forms]System.Windows.Forms.CheckState [System.Windows.Forms]System.Windows.Forms.ItemCheckEventArgs::get_CurrentValue()
	IL_0006: ldc.i4.2
	IL_0007: bne.un.s IL_0011

	// e.NewValue = CheckState.Indeterminate;
	IL_0009: ldarg.2
	IL_000a: ldc.i4.2
	IL_000b: callvirt instance void [System.Windows.Forms]System.Windows.Forms.ItemCheckEventArgs::set_NewValue(valuetype [System.Windows.Forms]System.Windows.Forms.CheckState)

	// return;
	IL_0010: ret

	// else
	// object objectValue = RuntimeHelpers.GetObjectValue(lstOptions.Items[e.Index]);
	IL_0011: ldarg.0

---
- bugfix, race condition when reapplying patch without restarting patcher

SnesPatcher.modZps_Async.applyZpsPatch_async

	modZps_Async.bFinished = false;

		ldc.i4.0
		stsfld		bool SnesPatcher.modZps_Async::bFinished

---
- change, visible difference to patcher for end user

SnesPatcher.frmSnesPatcher.frmSnesPatcher_Load

	this.Text = "Snes ZPS Patcher V0.18+";

		ldstr		"Snes ZPS Patcher V0.18+"

---
- anti-compat, allow funky version trick in ZPS file to block compatibility with old patcher version

libSnesAssembler.AsmPatch.AsmPatch(string)	[.ctor(string)]

	bool flag8 = Strings.StrComp(this.sVersion, AsmPatch.patcherVersion, CompareMethod.Text) != 0;

148	019D	ldc.i4.1

---
