Fixed some minor things.

This commit is contained in:
OBattler
2018-10-07 15:05:14 +02:00
parent 53e518692b
commit 45731dbaa0
3 changed files with 18 additions and 18 deletions

View File

@@ -8,7 +8,7 @@
* *
* Configuration file handler. * Configuration file handler.
* *
* Version: @(#)config.c 1.0.56 2018/10/06 * Version: @(#)config.c 1.0.57 2018/10/07
* *
* Authors: Sarah Walker, * Authors: Sarah Walker,
* Miran Grca, <mgrca8@gmail.com> * Miran Grca, <mgrca8@gmail.com>
@@ -1693,7 +1693,7 @@ static void
save_hard_disks(void) save_hard_disks(void)
{ {
char *cat = "Hard disks"; char *cat = "Hard disks";
char temp[24], tmp2[64]; char temp[32], tmp2[64];
char *p; char *p;
int c; int c;

View File

@@ -904,7 +904,7 @@ void codegen_generate_call(uint8_t opcode, OpFn op, uint32_t fetchdat, uint32_t
codeblock_t *block = &codeblock[block_current]; codeblock_t *block = &codeblock[block_current];
uint32_t op_32 = use32; uint32_t op_32 = use32;
uint32_t op_pc = new_pc; uint32_t op_pc = new_pc;
OpFn *op_table = x86_dynarec_opcodes; OpFn *op_table = (OpFn *) x86_dynarec_opcodes;
RecompOpFn *recomp_op_table = recomp_opcodes; RecompOpFn *recomp_op_table = recomp_opcodes;
int opcode_shift = 0; int opcode_shift = 0;
int opcode_mask = 0x3ff; int opcode_mask = 0x3ff;
@@ -929,7 +929,7 @@ void codegen_generate_call(uint8_t opcode, OpFn op, uint32_t fetchdat, uint32_t
switch (opcode) switch (opcode)
{ {
case 0x0f: case 0x0f:
op_table = x86_dynarec_opcodes_0f; op_table = (OpFn *) x86_dynarec_opcodes_0f;
recomp_op_table = recomp_opcodes_0f; recomp_op_table = recomp_opcodes_0f;
over = 1; over = 1;
break; break;
@@ -967,7 +967,7 @@ void codegen_generate_call(uint8_t opcode, OpFn op, uint32_t fetchdat, uint32_t
break; break;
case 0xd8: case 0xd8:
op_table = (op_32 & 0x200) ? x86_dynarec_opcodes_d8_a32 : x86_dynarec_opcodes_d8_a16; op_table = (op_32 & 0x200) ? (OpFn *) x86_dynarec_opcodes_d8_a32 : (OpFn *) x86_dynarec_opcodes_d8_a16;
recomp_op_table = recomp_opcodes_d8; recomp_op_table = recomp_opcodes_d8;
opcode_shift = 3; opcode_shift = 3;
opcode_mask = 0x1f; opcode_mask = 0x1f;
@@ -977,7 +977,7 @@ void codegen_generate_call(uint8_t opcode, OpFn op, uint32_t fetchdat, uint32_t
block->flags |= CODEBLOCK_HAS_FPU; block->flags |= CODEBLOCK_HAS_FPU;
break; break;
case 0xd9: case 0xd9:
op_table = (op_32 & 0x200) ? x86_dynarec_opcodes_d9_a32 : x86_dynarec_opcodes_d9_a16; op_table = (op_32 & 0x200) ? (OpFn *) x86_dynarec_opcodes_d9_a32 : (OpFn *) x86_dynarec_opcodes_d9_a16;
recomp_op_table = recomp_opcodes_d9; recomp_op_table = recomp_opcodes_d9;
opcode_mask = 0xff; opcode_mask = 0xff;
over = 1; over = 1;
@@ -986,7 +986,7 @@ void codegen_generate_call(uint8_t opcode, OpFn op, uint32_t fetchdat, uint32_t
block->flags |= CODEBLOCK_HAS_FPU; block->flags |= CODEBLOCK_HAS_FPU;
break; break;
case 0xda: case 0xda:
op_table = (op_32 & 0x200) ? x86_dynarec_opcodes_da_a32 : x86_dynarec_opcodes_da_a16; op_table = (op_32 & 0x200) ? (OpFn *) x86_dynarec_opcodes_da_a32 : (OpFn *) x86_dynarec_opcodes_da_a16;
recomp_op_table = recomp_opcodes_da; recomp_op_table = recomp_opcodes_da;
opcode_mask = 0xff; opcode_mask = 0xff;
over = 1; over = 1;
@@ -995,7 +995,7 @@ void codegen_generate_call(uint8_t opcode, OpFn op, uint32_t fetchdat, uint32_t
block->flags |= CODEBLOCK_HAS_FPU; block->flags |= CODEBLOCK_HAS_FPU;
break; break;
case 0xdb: case 0xdb:
op_table = (op_32 & 0x200) ? x86_dynarec_opcodes_db_a32 : x86_dynarec_opcodes_db_a16; op_table = (op_32 & 0x200) ? (OpFn *) x86_dynarec_opcodes_db_a32 : (OpFn *) x86_dynarec_opcodes_db_a16;
recomp_op_table = recomp_opcodes_db; recomp_op_table = recomp_opcodes_db;
opcode_mask = 0xff; opcode_mask = 0xff;
over = 1; over = 1;
@@ -1004,7 +1004,7 @@ void codegen_generate_call(uint8_t opcode, OpFn op, uint32_t fetchdat, uint32_t
block->flags |= CODEBLOCK_HAS_FPU; block->flags |= CODEBLOCK_HAS_FPU;
break; break;
case 0xdc: case 0xdc:
op_table = (op_32 & 0x200) ? x86_dynarec_opcodes_dc_a32 : x86_dynarec_opcodes_dc_a16; op_table = (op_32 & 0x200) ? (OpFn *) x86_dynarec_opcodes_dc_a32 : (OpFn *) x86_dynarec_opcodes_dc_a16;
recomp_op_table = recomp_opcodes_dc; recomp_op_table = recomp_opcodes_dc;
opcode_shift = 3; opcode_shift = 3;
opcode_mask = 0x1f; opcode_mask = 0x1f;
@@ -1014,7 +1014,7 @@ void codegen_generate_call(uint8_t opcode, OpFn op, uint32_t fetchdat, uint32_t
block->flags |= CODEBLOCK_HAS_FPU; block->flags |= CODEBLOCK_HAS_FPU;
break; break;
case 0xdd: case 0xdd:
op_table = (op_32 & 0x200) ? x86_dynarec_opcodes_dd_a32 : x86_dynarec_opcodes_dd_a16; op_table = (op_32 & 0x200) ? (OpFn *) x86_dynarec_opcodes_dd_a32 : (OpFn *) x86_dynarec_opcodes_dd_a16;
recomp_op_table = recomp_opcodes_dd; recomp_op_table = recomp_opcodes_dd;
opcode_mask = 0xff; opcode_mask = 0xff;
over = 1; over = 1;
@@ -1023,7 +1023,7 @@ void codegen_generate_call(uint8_t opcode, OpFn op, uint32_t fetchdat, uint32_t
block->flags |= CODEBLOCK_HAS_FPU; block->flags |= CODEBLOCK_HAS_FPU;
break; break;
case 0xde: case 0xde:
op_table = (op_32 & 0x200) ? x86_dynarec_opcodes_de_a32 : x86_dynarec_opcodes_de_a16; op_table = (op_32 & 0x200) ? (OpFn *) x86_dynarec_opcodes_de_a32 : (OpFn *) x86_dynarec_opcodes_de_a16;
recomp_op_table = recomp_opcodes_de; recomp_op_table = recomp_opcodes_de;
opcode_mask = 0xff; opcode_mask = 0xff;
over = 1; over = 1;
@@ -1032,7 +1032,7 @@ void codegen_generate_call(uint8_t opcode, OpFn op, uint32_t fetchdat, uint32_t
block->flags |= CODEBLOCK_HAS_FPU; block->flags |= CODEBLOCK_HAS_FPU;
break; break;
case 0xdf: case 0xdf:
op_table = (op_32 & 0x200) ? x86_dynarec_opcodes_df_a32 : x86_dynarec_opcodes_df_a16; op_table = (op_32 & 0x200) ? (OpFn *) x86_dynarec_opcodes_df_a32 : (OpFn *) x86_dynarec_opcodes_df_a16;
recomp_op_table = recomp_opcodes_df; recomp_op_table = recomp_opcodes_df;
opcode_mask = 0xff; opcode_mask = 0xff;
over = 1; over = 1;
@@ -1045,11 +1045,11 @@ void codegen_generate_call(uint8_t opcode, OpFn op, uint32_t fetchdat, uint32_t
break; break;
case 0xf2: /*REPNE*/ case 0xf2: /*REPNE*/
op_table = x86_dynarec_opcodes_REPNE; op_table = (OpFn *) x86_dynarec_opcodes_REPNE;
recomp_op_table = recomp_opcodes_REPNE; recomp_op_table = recomp_opcodes_REPNE;
break; break;
case 0xf3: /*REPE*/ case 0xf3: /*REPE*/
op_table = x86_dynarec_opcodes_REPE; op_table = (OpFn *) x86_dynarec_opcodes_REPE;
recomp_op_table = recomp_opcodes_REPE; recomp_op_table = recomp_opcodes_REPE;
break; break;
@@ -1096,7 +1096,7 @@ generate_call:
if ((op_table == x86_dynarec_opcodes_REPNE || op_table == x86_dynarec_opcodes_REPE) && !op_table[opcode | op_32]) if ((op_table == x86_dynarec_opcodes_REPNE || op_table == x86_dynarec_opcodes_REPE) && !op_table[opcode | op_32])
{ {
op_table = x86_dynarec_opcodes; op_table = (OpFn *) x86_dynarec_opcodes;
recomp_op_table = recomp_opcodes; recomp_op_table = recomp_opcodes;
} }

View File

@@ -8,7 +8,7 @@
* *
* user Interface module for WinAPI on Windows. * user Interface module for WinAPI on Windows.
* *
* Version: @(#)win_ui.c 1.0.30 2018/07/28 * Version: @(#)win_ui.c 1.0.31 2018/10/07
* *
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/> * Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com> * Miran Grca, <mgrca8@gmail.com>
@@ -1082,12 +1082,12 @@ plat_set_input(HWND h)
{ {
/* If needed, rest the old one first. */ /* If needed, rest the old one first. */
if (input_orig_hwnd != NULL) { if (input_orig_hwnd != NULL) {
SetWindowLongPtr(input_orig_hwnd, GWL_WNDPROC, SetWindowLongPtr(input_orig_hwnd, GWLP_WNDPROC,
(LONG_PTR)input_orig_proc); (LONG_PTR)input_orig_proc);
} }
/* Redirect the window procedure so we can catch WM_INPUT. */ /* Redirect the window procedure so we can catch WM_INPUT. */
input_orig_proc = GetWindowLongPtr(h, GWLP_WNDPROC); input_orig_proc = GetWindowLongPtr(h, GWLP_WNDPROC);
input_orig_hwnd = h; input_orig_hwnd = h;
SetWindowLongPtr(h, GWL_WNDPROC, (LONG_PTR)&input_proc); SetWindowLongPtr(h, GWLP_WNDPROC, (LONG_PTR)&input_proc);
} }