]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Minor fixes
authorDimitris Panokostas <dimitris.panokostas@norce.io>
Thu, 2 Nov 2023 15:13:43 +0000 (16:13 +0100)
committerDimitris Panokostas <dimitris.panokostas@norce.io>
Thu, 2 Nov 2023 15:13:43 +0000 (16:13 +0100)
- Fix missing #ifdef DEBUGGER in a few places
- Fixed decide_hdiw2 parameters when DEBUGGER is not available
- Removed redundant extra break statement in intputdevice.cpp

custom.cpp
gencpu.cpp
inputdevice.cpp

index 51ca5cd9a0464af1f1d35e195eea66c89e78aa1f..dcc45bd3d68f6c6607c6b2642423ca6e66f63425 100644 (file)
@@ -1684,7 +1684,7 @@ static void decide_hdiw(int hpos, bool halfcycle = false)
                }
        }
 #else
-       decide_hdiw2(hpos);
+       decide_hdiw2(hpos, halfcycle);
 #endif
 }
 
@@ -8063,7 +8063,9 @@ static void VHPOSW_delayed(uae_u32 v)
 #endif
        }
        vpos = newvpos;
+#ifdef DEBUGGER
        record_dma_denise(hnew, hdiw_denisecounter >> 2);
+#endif
        vb_check();
        decide_vline(hnew);
        vhposw_modified = true;
index 06d66282167aa517827f01e4ddf1ba0cfb74e849..1c2bb89c707ddd0e8aca5db39a2d929233d65304 100644 (file)
@@ -7040,7 +7040,9 @@ static void gen_opcode (unsigned int opcode)
                                out("opcode |= 0x20000;\n");
                        }
                        if (using_debugmem) {
+                               out("#ifdef DEBUGGER\n");
                                out("branch_stack_pop_rte(oldpc);\n");
+                               out("#endif\n");
                        }
                } else if (cpu_level == 1 && using_prefetch) {
                        // 68010
@@ -7088,7 +7090,9 @@ static void gen_opcode (unsigned int opcode)
                        out("newsr = sr; newpc = pc;\n");
                        setpc ("newpc");
                        if (using_debugmem) {
+                               out("#ifdef DEBUGGER\n");
                                out("branch_stack_pop_rte(oldpc);\n");
+                               out("#endif\n");
                        }
                } else {
                        out("uaecptr oldpc = %s;\n", getpc);
@@ -7202,7 +7206,9 @@ static void gen_opcode (unsigned int opcode)
                        out("}\n");
                    setpc ("newpc");
                        if (using_debugmem) {
+                               out("#ifdef DEBUGGER\n");
                                out("branch_stack_pop_rte(oldpc);\n");
+                               out("#endif\n");
                        }
                }
                /* PC is set and prefetch filled. */
@@ -7358,9 +7364,11 @@ static void gen_opcode (unsigned int opcode)
                        count_readl++;
                }
                if (using_debugmem) {
+                       out("#ifdef DEBUGGER\n");
                        out("if (debugmem_trace) {\n");
                        out("branch_stack_pop_rts(oldpc);\n");
                        out("}\n");
+                       out("#endif\n");
                }
            out("if (%s & 1) {\n", getpc);
                out("uaecptr faultpc = %s;\n", getpc);
@@ -7595,9 +7603,11 @@ static void gen_opcode (unsigned int opcode)
                                if (cpu_level >= 4)
                                        out("m68k_areg(regs, 7) -= 4;\n");
                                if (using_debugmem) {
+                                       out("#ifdef DEBUGGER\n");
                                        out("if (debugmem_trace) {\n");
                                        out("branch_stack_push(oldpc, nextpc);\n");
                                        out("}\n");
+                                       out("#endif\n");
                                }
                        }
                        fill_prefetch_full_020();
@@ -7752,9 +7762,11 @@ static void gen_opcode (unsigned int opcode)
                        out("}\n");
                }
                if (using_debugmem) {
+                       out("#ifdef DEBUGGER\n");
                        out("if (debugmem_trace) {\n");
                        out("branch_stack_push(oldpc, nextpc);\n");
                        out("}\n");
+                       out("#endif\n");
                }
                clear_m68k_offset();
                if (using_prefetch || using_ce) {
index 7ef17809b4cf40967826c8974b9cebe57c3c4f21..8447f09cc6c573ecc131e5be6028f16a1d251530 100644 (file)
@@ -5073,8 +5073,6 @@ static bool inputdevice_handle_inputcode2(int monid, int code, int state, const
                _tcscpy (changed_prefs.floppyslots[code - AKS_DISKSWAPPER_INSERT0].df, currprefs.dfxlist[swapperslot]);
                set_config_changed ();
                break;
-
-               break;
        case AKS_INPUT_CONFIG_1:
        case AKS_INPUT_CONFIG_2:
        case AKS_INPUT_CONFIG_3: