]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
3400 3400
authorToni Wilen <twilen@winuae.net>
Wed, 21 Dec 2016 20:03:29 +0000 (22:03 +0200)
committerToni Wilen <twilen@winuae.net>
Wed, 21 Dec 2016 20:03:29 +0000 (22:03 +0200)
inputdevice.cpp
od-win32/keyboard_win32.cpp
od-win32/makeexe.cmd
od-win32/rp.cpp
od-win32/win32.h
od-win32/winuae_msvc14/winuae_msvc.sln
od-win32/winuae_msvc14/winuae_msvc.vcxproj
od-win32/winuae_msvc14/winuae_msvc.vcxproj.filters
od-win32/wix/Product.wxs

index 2d8c395a5ef3649451aa066155c976f3be6ebd5c..3975948dc1c1ad86f59de18d4d2b73451628ce24 100644 (file)
@@ -190,7 +190,7 @@ int inputdevice_uaelib (const TCHAR *s, const TCHAR *parm)
 {
        int i;
 
-       //write_log(_T("%s\n"), s);
+       //write_log(_T("%s: %s\n"), s, parm);
 
        if (!_tcsncmp(s, _T("KEY_RAW_"), 8)) {
                // KEY_RAW_UP <code>
@@ -3473,11 +3473,12 @@ int handle_custom_event (const TCHAR *custom, int append)
        //write_log (_T("%s\n"), custom);
 
        if (append) {
-               struct delayed_event *dee = delayed_events;
+               struct delayed_event *dee = delayed_events, *prev = NULL;
                while (dee) {
                        if (dee->delay > 0 && dee->delay > adddelay && dee->append) {
                                adddelay = dee->delay;
                        }
+                       prev = dee;
                        dee = dee->next;
                }
        }
@@ -3519,8 +3520,11 @@ int handle_custom_event (const TCHAR *custom, int append)
                                next = p + 8;
                                delay = _tstol(p + 7);
                        }
-                       if (adddelay > 0 && adddelay > delay)
+                       if (adddelay && delay < 0) {
                                delay = adddelay;
+                       } else if (adddelay > 0 && delay >= 0) {
+                               delay += adddelay;
+                       }
                        if (delay >= 0) {
                                if (!p2) {
                                        if (!next)
@@ -3531,7 +3535,7 @@ int handle_custom_event (const TCHAR *custom, int append)
                                struct delayed_event *de = delayed_events;
                                while (de) {
                                        if (de->delay < 0) {
-                                               de->delay = delay;
+                                               de->delay = delay + 1;
                                                de->event_string = p2 ? my_strdup (p2) : my_strdup(_T(""));
                                                de->append = append;
                                                break;
@@ -3542,7 +3546,7 @@ int handle_custom_event (const TCHAR *custom, int append)
                                        de = xcalloc (delayed_event, 1);
                                        de->next = delayed_events;
                                        delayed_events = de;
-                                       de->delay = delay;
+                                       de->delay = delay + 1;
                                        de->append = append;
                                        de->event_string = p2 ? my_strdup (p2) : my_strdup(_T(""));
                                }
@@ -3601,8 +3605,11 @@ void inputdevice_hsync (void)
        catweasel_hsync ();
 #endif
 
-       struct delayed_event *de = delayed_events;
+       int cnt = 0;
+       struct delayed_event *de = delayed_events, *prev = NULL;
        while (de) {
+               if (de->delay < 0)
+                       cnt++;
                if (de->delay > 0)
                        de->delay--;
                if (de->delay == 0) {
@@ -3614,8 +3621,26 @@ void inputdevice_hsync (void)
                                xfree (s);
                        }
                }
+               prev = de;
                de = de->next;
        }
+       if (cnt > 4) {
+               // too many, delete some
+               struct delayed_event *de_prev = NULL;
+               de = delayed_events;
+               while (de) {
+                       if (de->delay < 0 && de != delayed_events) {
+                               struct delayed_event *next = de->next;
+                               de_prev->next = next;
+                               xfree(de->event_string);
+                               xfree(de);
+                               de = next;
+                       } else {
+                               de_prev = de;
+                               de = de->next;
+                       }
+               }
+       }
 
        for (int i = 0; i < INPUT_QUEUE_SIZE; i++) {
                struct input_queue_struct *iq = &input_queue[i];
index 5693f8c2c83a6e92808a2c23c9103e2d4572c033..bb14661e86b27c0a550b661f21dafb0b138d9d83 100644 (file)
@@ -404,11 +404,20 @@ bool my_kbd_handler (int keyboard, int scancode, int newstate)
 #if 0
        if (scancode == DIK_F1) {
                if (newstate) {
-                       extern int paska;
-                       paska++;
+                       char msg[20000];
+                       FILE *f = fopen("test.txt", "rb");
+                       memset(msg, 0, sizeof msg);
+                       fread(msg, 1, sizeof msg, f);
+                       void parse_guest_event(const TCHAR *ss);
+                       TCHAR *txt = au(msg);
+                       parse_guest_event(txt);
+                       free(txt);
+                       fclose(f);
                }
-               return;
+               return true;
        }
+#endif
+#if 0
        if (scancode == DIK_F2) {
                if (newstate) {
                        extern int paska;
index cc6275fd4fd25c656e1ecc83b82e961673ca5ca4..378cb2d2bbdfb2e7628698153ff6ec9bbaad4fa5 100644 (file)
@@ -5,11 +5,11 @@ copy docs\windows\translation.txt d:\amiga
 zip -9 -r c:\projects\winuae\src\od-win32\winuae.zip *
 cd c:\projects\winuae\src\od-win32
 copy winuae.zip d:\amiga\WinUAE%1.zip
-copy c:\projects\winuae\src\od-win32\wix\bin\Release\winuae.msi d:\amiga\InstallWinUAE%1.msi
-copy resourcedll\release\resourcedll.dll d:\amiga\WinUAE_default.dll
+#;copy c:\projects\winuae\src\od-win32\wix\bin\Release\winuae.msi d:\amiga\InstallWinUAE%1.msi
+#;copy resourcedll\release\resourcedll.dll d:\amiga\WinUAE_default.dll
 cdd d:\amiga
 zip -9 WinUAE%1_x64.zip winuae64.exe
-zip -9 WinUAE%1_translation WinUAE_default.dll translation.txt
-del translation.txt
+#;zip -9 WinUAE%1_translation WinUAE_default.dll translation.txt
+#;del translation.txt
 cdd c:\projects\winuae\src\od-win32
 del *.zip
index fd50286e56c8f3a909741fcd18e68687afc3cc77..3c72710057a2b81a0cb8b842638a8988e4e4c58f 100644 (file)
@@ -1613,13 +1613,22 @@ void rp_fixup_options (struct uae_prefs *p)
        }
        RPSendMessagex (RP_IPC_TO_HOST_DEVICES, RP_DEVICECATEGORY_FLOPPY, floppy_mask, NULL, 0, &guestinfo, NULL);
 
-       RPSendMessagex (RP_IPC_TO_HOST_DEVICES, RP_DEVICECATEGORY_INPUTPORT, (1 << maxjports) - 1, NULL, 0, &guestinfo, NULL);
+       RPSendMessagex (RP_IPC_TO_HOST_DEVICES, RP_DEVICECATEGORY_INPUTPORT, (1 << 2) - 1, NULL, 0, &guestinfo, NULL);
        rp_input_change (0);
        rp_input_change (1);
-       rp_input_change (2);
-       rp_input_change (3);
        gameportmask[0] = gameportmask[1] = gameportmask[2] = gameportmask[3] = 0;
 
+       int parportmask = 0;
+       for (i = 0; i < 2; i++) {
+               if (p->jports[i + 2].idc.configname[0] || p->jports[i + 2].idc.name[0] || p->jports[i + 2].idc.shortid[0])
+                       parportmask |= 1 << i;
+       }
+       if (parportmask) {
+               RPSendMessagex (RP_IPC_TO_HOST_DEVICES, RP_DEVICECATEGORY_MULTITAPPORT, parportmask, NULL, 0, &guestinfo, NULL);
+               rp_input_change (2);
+               rp_input_change (3);
+       }
+
        hd_mask = 0;
        cd_mask = 0;
        for (i = 0; i < currprefs.mountitems; i++) {
@@ -1716,7 +1725,11 @@ void rp_input_change (int num)
        }
        if (log_rp & 1)
                write_log(_T("PORT%d: '%s':%d\n"), num, name, mode);
-       rp_device_change (RP_DEVICECATEGORY_INPUTPORT, num, mode, true, name);
+       if (num >= 2) {
+               rp_device_change (RP_DEVICECATEGORY_MULTITAPPORT, num - 2, mode, true, name);
+       } else {
+               rp_device_change (RP_DEVICECATEGORY_INPUTPORT, num, mode, true, name);
+       }
 }
 void rp_disk_image_change (int num, const TCHAR *name, bool writeprotected)
 {
index 1e8b2594c01535713ca0ae54e60d5be3cafec114..b3b7f215be72b6e92fc93882634b8f714bae2772 100644 (file)
 #define GETBDM(x) (((x) - ((x / 10000) * 10000)) / 100)
 #define GETBDD(x) ((x) % 100)
 
-#define WINUAEPUBLICBETA 1
+#define WINUAEPUBLICBETA 0
 #define LANG_DLL 1
 #define LANG_DLL_FULL_VERSION_MATCH 1
 
 #if WINUAEPUBLICBETA
-#define WINUAEBETA _T("20")
+#define WINUAEBETA _T("0")
 #else
 #define WINUAEBETA _T("")
 #endif
 
-#define WINUAEDATE MAKEBD(2016, 12, 17)
+#define WINUAEDATE MAKEBD(2016, 12, 21)
 
 //#define WINUAEEXTRA _T("AmiKit Preview")
 //#define WINUAEEXTRA _T("Amiga Forever Edition")
@@ -67,7 +67,6 @@ void WIN32_HandleRegistryStuff (void);
 extern void setup_brkhandler (void);
 extern void remove_brkhandler (void);
 extern void disablecapture (void);
-extern void fullscreentoggle (void);
 extern int isfocus (void);
 extern void gui_restart (void);
 int timebegin (void);
index 938ade2bec4b2b034b8797b9ee5bf667c3450e02..819835183ae7fe3cdbbcb83b093cf51d111bdb20 100644 (file)
@@ -1,6 +1,6 @@
 Microsoft Visual Studio Solution File, Format Version 12.00
 # Visual Studio 14
-VisualStudioVersion = 14.0.23107.0
+VisualStudioVersion = 14.0.25420.1
 MinimumVisualStudioVersion = 10.0.40219.1
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winuae", "winuae_msvc.vcxproj", "{4ADAA943-1AC8-4FB5-82E5-4FB753B6C2DA}"
 EndProject
@@ -309,7 +309,8 @@ Global
                {BE211CE1-3955-4674-A664-5038FC791980}.Release|Mixed Platforms.ActiveCfg = Release|x86
                {BE211CE1-3955-4674-A664-5038FC791980}.Release|Mixed Platforms.Build.0 = Release|x86
                {BE211CE1-3955-4674-A664-5038FC791980}.Release|Win32.ActiveCfg = Release|x86
-               {BE211CE1-3955-4674-A664-5038FC791980}.Release|x64.ActiveCfg = Release|x86
+               {BE211CE1-3955-4674-A664-5038FC791980}.Release|x64.ActiveCfg = Release|x64
+               {BE211CE1-3955-4674-A664-5038FC791980}.Release|x64.Build.0 = Release|x64
                {BE211CE1-3955-4674-A664-5038FC791980}.Test|Mixed Platforms.ActiveCfg = Release|x86
                {BE211CE1-3955-4674-A664-5038FC791980}.Test|Mixed Platforms.Build.0 = Release|x86
                {BE211CE1-3955-4674-A664-5038FC791980}.Test|Win32.ActiveCfg = Release|x86
index 98440859d6c4afa11dcd296fa7a896cf402af926..1e270f2e32886bc56c8793fba5ea857ec298b322 100644 (file)
@@ -39,6 +39,7 @@
     <ProjectGuid>{4ADAA943-1AC8-4FB5-82E5-4FB753B6C2DA}</ProjectGuid>
     <RootNamespace>winuae</RootNamespace>
     <TargetPlatformVersion>8.1</TargetPlatformVersion>
+    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='FullRelease|Win32'" Label="Configuration">
index b0f75ca7c44449dfe8f7f73adfdb8fb111e46843..8faf8474c66ed1023bc5c4538a590eccb36a59e4 100644 (file)
@@ -17,9 +17,6 @@
       <UniqueIdentifier>{e76a708a-933c-4af4-bad2-0820d79b6a78}</UniqueIdentifier>
       <Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
     </Filter>
-    <Filter Include="prowizard">
-      <UniqueIdentifier>{dab2f6c7-d741-4002-b0c9-566a1536642a}</UniqueIdentifier>
-    </Filter>
     <Filter Include="unpackers">
       <UniqueIdentifier>{a88602d5-1980-49b2-a87a-79afa3ca7346}</UniqueIdentifier>
     </Filter>
@@ -65,6 +62,9 @@
     <Filter Include="support">
       <UniqueIdentifier>{fe9d96c8-c5ef-4f92-b9dc-79b5d3e4145c}</UniqueIdentifier>
     </Filter>
+    <Filter Include="qemu\prowizard">
+      <UniqueIdentifier>{dab2f6c7-d741-4002-b0c9-566a1536642a}</UniqueIdentifier>
+    </Filter>
   </ItemGroup>
   <ItemGroup>
     <ClCompile Include="..\ahidsound_dsonly.cpp">
       <Filter>jit</Filter>
     </ClCompile>
     <ClCompile Include="..\..\moduleripper.cpp">
-      <Filter>prowizard</Filter>
+      <Filter>qemu\prowizard</Filter>
     </ClCompile>
     <ClCompile Include="..\win32_scaler.cpp">
       <Filter>win32</Filter>
index 4977db600f45a4c02d4bbdce7f0b44439515ae3c..5d75ac40d11ff451cad1653c5acb1023e2d763c8 100644 (file)
@@ -1,6 +1,26 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
-  <Product Id="*" Name="WinUAE" Language="1033" Version="3.3.0.0" Manufacturer="Arabuusimiehet" UpgradeCode="88C6D045-E416-4AEA-9EE9-0B7A53EE0F16">
+
+  <?define ProductName = "WinUAE" ?>
+  <?define ProductVersion = "3.4.0" ?>
+  <?define ProductFullVersion = "3.4.0.0" ?>
+  <?define ProductAuthor = "Arabuusimiehet" ?>
+
+  <?if $(var.Platform) = x64 ?>
+  <?define ProductDisplayName = "$(var.ProductName) 64-bit" ?>
+  <?define ProductUpgradeCode = "F71425D0-9491-4273-BBC8-FED20F6492A2" ?>
+  <?define Win64 = "yes" ?>
+  <?define PlatformProgramFilesFolder = "ProgramFiles64Folder" ?>
+  <?define ProductExecutable = "winuae64.exe" ?>
+  <?else ?>
+  <?define ProductDisplayName = "$(var.ProductName)" ?>
+  <?define ProductUpgradeCode = "88C6D045-E416-4AEA-9EE9-0B7A53EE0F16" ?>
+  <?define Win64 = "no" ?>
+  <?define PlatformProgramFilesFolder = "ProgramFilesFolder" ?>
+  <?define ProductExecutable = "winuae.exe" ?>
+  <?endif ?>
+
+    <Product Id="*" Name="$(var.ProductDisplayName) $(var.ProductVersion)" Language="1033" Version="$(var.ProductFullVersion)" Manufacturer="$(var.ProductAuthor)" UpgradeCode="$(var.ProductUpgradeCode)">
     <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
 
     <?define SRCDIST="$(var.winuae.ProjectDir)/../../../distribution/"?>
@@ -19,8 +39,8 @@
     <WixVariable Id="WixUIDialogBmp" Value="$(var.winuae.ProjectDir)/../graphics/amiga_welcome_2013.bmp" />
 
     <Directory Id="TARGETDIR" Name="SourceDir">
-      <Directory Id="ProgramFilesFolder">
-        <Directory Id="APPLICATIONROOTDIRECTORY" Name="WinUAE">
+      <Directory Id="$(var.PlatformProgramFilesFolder)">
+        <Directory Id="APPLICATIONROOTDIRECTORY" Name="$(var.ProductName)">
           <Directory Id="CONFIGURATIONS" Name="Configurations">
             <Directory Id="CONFIGURATIONSHOST" Name="Host"/>
           </Directory>
         </Directory>
       </Directory>
       <Directory Id="ProgramMenuFolder">
-        <Directory Id="ApplicationProgramsFolder" Name="WinUAE"/>
+        <Directory Id="ApplicationProgramsFolder" Name="$(var.ProductName)"/>
       </Directory>
       <Directory Id="DesktopFolder" Name="Desktop">
       </Directory>
     </Directory>
 
     <DirectoryRef Id="APPLICATIONROOTDIRECTORY">
-      <Component Id="winuae.exe" Guid="AE2CD6FB-A066-43B4-8C96-C75E3948367F">
-        <File Id="winuae.exe" Source="$(var.winuae.TargetPath)" KeyPath="yes" Checksum="yes"/>
+      <Component Id="winuae.exe" Guid="AE2CD6FB-A066-43B4-8C96-C75E3948367F" Win64="$(var.Win64)">
+        <File Id="$(var.ProductExecutable)" Source="$(var.winuae.TargetPath)" KeyPath="yes" Checksum="yes"/>
       </Component>
     </DirectoryRef>
 
     <DirectoryRef Id="DesktopFolder">
-      <Component Id="ApplicationDesktopShortcut" Guid="920BC800-12FC-4630-A612-39230FD4B4B7">
+      <Component Id="ApplicationDesktopShortcut" Guid="920BC800-12FC-4630-A612-39230FD4B4B7" Win64="$(var.Win64)">
         <Shortcut Id="ApplicationDesktopShortcut"
-          Name="WinUAE"
+          Name="$(var.ProductName)"
           Description="WinUAE Amiga emulator"
-          Target="[#winuae.exe]"
+          Target="[#$(var.ProductExecutable)]"
           WorkingDirectory="APPLICATIONROOTDIRECTORY"/>
         <RegistryValue Root="HKCU" Key="Software\Arabuusimiehet\WinUAE" Name="InstalledApplicationDesktopShortcut" Type="integer" Value="1" KeyPath="yes"/>
       </Component>
     </DirectoryRef>
 
     <DirectoryRef Id="ApplicationProgramsFolder">
-      <Component Id="ApplicationShortcut" Guid="469F7AC3-E634-49EE-BDAF-DAAD2134D7E2">
+      <Component Id="ApplicationShortcut" Guid="469F7AC3-E634-49EE-BDAF-DAAD2134D7E2" Win64="$(var.Win64)">
         <Shortcut Id="ApplicationStartMenuShortcut"
-          Name="WinUAE"
+          Name="$(var.ProductName)"
           Description="WinUAE Amiga emulator"
-          Target="[#winuae.exe]"
+          Target="[#$(var.ProductExecutable)]"
           WorkingDirectory="APPLICATIONROOTDIRECTORY"/>
         <RemoveFolder Id="ApplicationProgramsFolder" On="uninstall"/>
         <RegistryValue Root="HKCU" Key="Software\Arabuusimiehet\WinUAE" Name="InstalledApplicationShortcut" Type="integer" Value="1" KeyPath="yes"/>
       </Component>
-      <Component Id="DocsShortcut" Guid="7677FF51-F357-4657-B5DD-49801175E66B">
+      <Component Id="DocsShortcut" Guid="7677FF51-F357-4657-B5DD-49801175E66B" Win64="$(var.Win64)">
         <Shortcut Id="DocsStartMenuShortcut"
                   Name="Documents"
                   Target="[DOCS]"/>
         <RegistryValue Root="HKCU" Key="Software\Arabuusimiehet\WinUAE" Name="InstalledDocsShortcut" Type="integer" Value="1" KeyPath="yes"/>
       </Component>
-      <Component Id="AdditionalShortcut" Guid="9CD64D3C-96DA-4862-8E9E-6329A6296AFA">
+      <Component Id="AdditionalShortcut" Guid="9CD64D3C-96DA-4862-8E9E-6329A6296AFA" Win64="$(var.Win64)">
         <Shortcut Id="AdditionalStartMenuShortcut"
                   Name="Amiga Programs"
                   Target="[AMIGAPROGRAMS]"/>
     </DirectoryRef>
 
     <DirectoryRef Id="DOCS">
-      <Component Id="Docs1" Guid="1C0D979E-5C00-45BD-8C08-A78AA7E58530">
+      <Component Id="Docs1" Guid="1C0D979E-5C00-45BD-8C08-A78AA7E58530" Win64="$(var.Win64)">
         <File Source="$(var.SRCDIST)/Docs/Readme.txt" KeyPath="yes"/>
       </Component>
-      <Component Id="Docs2" Guid="ABE181C5-547C-4D9D-A486-DCB17F72C1B0">
+      <Component Id="Docs2" Guid="ABE181C5-547C-4D9D-A486-DCB17F72C1B0" Win64="$(var.Win64)">
         <File Source="$(var.SRCDIST)/Docs/winuaechangelog.txt" KeyPath="yes"/>
       </Component>
-      <Component Id="Docs3" Guid="D27F0463-C878-46C8-8D02-028D14BDD4A0">
+      <Component Id="Docs3" Guid="D27F0463-C878-46C8-8D02-028D14BDD4A0" Win64="$(var.Win64)">
         <File Source="$(var.SRCDIST)/Docs/History_old.txt" KeyPath="yes"/>
       </Component>
-      <Component Id="Docs4" Guid="82556236-9A44-4894-84BB-4066820E1B35">
+      <Component Id="Docs4" Guid="82556236-9A44-4894-84BB-4066820E1B35" Win64="$(var.Win64)">
         <File Source="$(var.SRCDIST)/Docs/README.compemu.txt" KeyPath="yes"/>
       </Component>
-      <Component Id="Docs5" Guid="E7AE8546-62E0-4537-989C-02E10C62E06E">
+      <Component Id="Docs5" Guid="E7AE8546-62E0-4537-989C-02E10C62E06E" Win64="$(var.Win64)">
         <File Source="$(var.SRCDIST)/Docs/README.JIT.txt" KeyPath="yes"/>
       </Component>
-      <Component Id="Docs6" Guid="33C9D310-7722-48B4-845B-48933023D647">
+      <Component Id="Docs6" Guid="33C9D310-7722-48B4-845B-48933023D647" Win64="$(var.Win64)">
         <File Source="$(var.SRCDIST)/Docs/README.JIT-tuning.txt" KeyPath="yes"/>
       </Component>
     </DirectoryRef>
 
     <DirectoryRef Id="TARGETDIR">
-      <Component Id="RegistryEntries" Guid="9C6F7B8F-7A9E-45DC-BF16-85A034CCE1FB">
+      <Component Id="RegistryEntries" Guid="9C6F7B8F-7A9E-45DC-BF16-85A034CCE1FB" Win64="$(var.Win64)">
         <RegistryKey Root="HKCU" Key="Software\Arabuusimiehet\WinUAE">
           <RegistryValue Type="string" Name="InstallPath" Value="[TARGETDIR]" KeyPath="yes"/>
         </RegistryKey>
       </Component>
     </DirectoryRef>
     
-    <Feature Id="MainApplication" Title="WinUAE" Description="WinUAE executable" Level="1" ConfigurableDirectory="APPLICATIONROOTDIRECTORY" Absent="disallow" AllowAdvertise="no">
+    <Feature Id="MainApplication" Title="$(var.ProductName)" Description="WinUAE executable" Level="1" ConfigurableDirectory="APPLICATIONROOTDIRECTORY" Absent="disallow" AllowAdvertise="no">
       <ComponentRef Id="winuae.exe" />
       <ComponentRef Id="ApplicationShortcut" />
       <ComponentRef Id="ApplicationDesktopShortcut" />