Commit graph

74297 commits

Author SHA1 Message Date
Pierre Schweitzer e5b0087c8e
[DCOMLAUNCH][WMISVC] Stop busy waiting shutdown 2019-03-03 23:14:37 +01:00
Colin Finck bd0a28d1e4 Fix the MSVC version of ldexp filling up the FPU stack and bailing out with #IND after a few calls. Additionally, add it back to libcntpr.
MSVC was previously given a "result" variable to copy the fscale result from st(0). This led to another "fld" FPU stack push at the very end without popping the source value from the FPU stack.
Moreover, this copy isn't even needed: A simple "fstp st(1)" at the end pops an element from the FPU stack while effectively storing the result in st(0), the register used for returning a double value.
This problem didn't affect GCC, as it is only given the "fscale" instruction and does all necessary stack operations itself.

However, looking into the CRT sources, I found many other i386 implementations with inline assembly suffering from the same problem.
Fortunately, they have been replaced by pure assembly implementations a while ago, so it's time to finally remove them.
ldexp would have also been a candidate for a pure assembly implementation, but the required check for NaN and setting errno (verified on Win2003) already outweighs the benefits.
And we cannot just do a NaN check with FUCOMI as this is an i686/pentiumpro instruction while we're still targeting i586/pentium.

I'm also using this opportunity to clean up the ldexp.c header and only put in the remaining contributors as returned by "git blame".

Thanks to NightWolve1975 for reporting the problem! (https://twitter.com/nightwolve1975/status/1099042477531643912)
2019-03-03 16:11:27 +01:00
Pierre Schweitzer 2ab289a34a
[DCOMLAUNCH] Add a DcomLaunch service stub
This stub is responsible for providing the UUID seed to the kernel.
For now, it generates a purely random seed - MAC address support
is to be added.
Because it's purely random seed and local the machine (not tied
to the MAC address) it's made so that ExUuidCreate keeps returning
RPC_NT_UUID_LOCAL_ONLY. It won't fix failing test for now.

Nota: this service shouldn't exist as it. It should be implemented
though rpcss DLL for both rpcss service (network service) and
dcomlaunch service (local system service).
Because rpcss is EXE based and wine-synced for now, I prefered
stubbing a new service. This will have to be changed at some point.
2019-03-03 14:25:19 +01:00
Joachim Henze 1d7287288d [SHELL32] Update all languages RCs to fix possible text truncation CORE-15765
IDD_BROWSE_FOR_FOLDER displays text controlled by the calling applications in
IDC_BROWSE_FOR_FOLDER_TITLE. Its old height could lead to text truncation
for existing 3rd party apps.
The new height value for IDC_BROWSE_FOR_FOLDER_TITLE
was inspired by IDC with the same from dialog IDD_BROWSE_FOR_FOLDER_NEW.
I could change all languages to the same height,
as dimensions of the dialog and surrounding controls were same.
2019-03-03 02:23:34 +01:00
Joachim Henze 026c575577 [MSI] In dialogs show titlebar buttons CORE-15301
Import the Wine fix
https://source.winehq.org/git/wine.git/?a=commit;h=84e6b331918d57f39e20a3063b67eb7fc0876288
Many thanks to the fixes author Fabian Maurer.
2019-03-03 01:26:59 +01:00
Joachim Henze 3b96148641 [TASKMGR] Update german rc to avoid text truncation in status-bar CORE-15615
which became a necessity after the second field was reduced in width
by commit 0.4.12-dev-363-g
473e0bfc83
2019-03-03 00:46:23 +01:00
Eric Kohl e88a6b2053 [SETUPAPI] Implement CM_Next_Range() 2019-03-02 20:59:12 +01:00
Bișoc George 0bc8e2a5bb [COVERITY][SETUPAPI] Release the blocks of memory when done
pRange variable allocates blocks of memory from the heap by HeapAlloc() although this resource is never freed afterwards.

COVERITY CID 1427056
2019-03-02 20:39:09 +01:00
jimtabor b6262a25fd Use GDI Batch for PatBlt
This should increase speed a bit. Makes a good argument to use
PolyPatBlt for more than one call.
PolyPatBlt is not fully tested yet.
2019-03-02 11:30:21 -06:00
Pierre Schweitzer 1114b89952
[NTOSKRNL] Fix MSVC2010 build 2019-03-02 11:10:37 +01:00
Pierre Schweitzer c2b6c3a69f
[NTOSKRNL] Fix ClockDiff aka fix MSVC build 2019-03-02 10:45:34 +01:00
Pierre Schweitzer bbfb3caa36
[NTOSKRNL] Add a test for ExUuidCreate 2019-03-02 10:30:00 +01:00
Eric Kohl 28309096df [SNDVOL32] In record mode, rename the 'Mute' autocheckbox to 'Select', turn it into a checkbox and make it behave like a radiobutton. 2019-03-01 22:01:14 +01:00
Pierre Schweitzer eb8b481cd4
[NTOSKRNL] Rewrite/fix our UUID generation implementation
So that it matches Windows behavior
Also implement ExUuidCreate that will generate UUID version 1

The implementation is based on the RFC 4122
2019-03-01 08:22:48 +01:00
Pierre Schweitzer 2d9673c68f
[NTOSKRNL] Introduce the UUID_CACHED_VALUES_STRUCT structure
Source: https://blog.48bits.com/el-codigo-ntoskvinci/
2019-03-01 08:22:47 +01:00
Pierre Schweitzer 81c88c1029
[NTOSKRNL] UuidMutex -> ExpUuidLock 2019-03-01 08:22:47 +01:00
Bișoc George d000a1e1c6 [OSK] Implement "Use Click Sound" feature
- Implement the save/load handler for this feature
- Check the "Use Click Sound" item state accordingly depending if it's enabled or disabled
- Use PlaySoundW() to play the wave sound file from resource
- Add the WAV sound click file. The work is made thanks to Midori Mizuno
2019-03-01 00:13:47 +01:00
Thomas Faber 1001e6089f
[HDAUDBUS] Wait until the correct number of responses was received. CORE-15465
We previously only gave the device a hard-coded amount of time to respond,
which could lead to interpreting the contents of uninitialized memory as
a response. This would lead to an unreasonably large number of audio function
groups being detected.

A KSEMAPHORE mirrors what Haiku uses here, though it may not be the optimal
synchronization primitive for this case under Windows.
2019-02-28 10:27:06 +01:00
Thomas Faber 8530ae9950
[HDAUDBUS] Handle responses in a DPC instead of the ISR. 2019-02-28 10:06:18 +01:00
Thomas Faber a7431880bd
[HDAUDBUS] Fix a DPRINT. 2019-02-28 10:05:53 +01:00
Thomas Faber 1f76fb738a
[HDAUDBUS] Prevent overflow of the AudioGroups array. CORE-14153 CORE-15465
This protects against crashing in case of faulty/malicious hardware,
but also works around a bug in HDA_SendVerbs that causes it to return
invalid data, thereby suggesting more groups than are actually present.
2019-02-27 11:04:23 +01:00
Bișoc George 8423d8b7e1 [SNDVOL32] Small Italian translation update 2019-02-26 23:04:23 +01:00
Thomas Faber a8414f665b
[HDAUDBUS] Implement HDA_Unload. Stub HDA_Power and HDA_SystemControl. 2019-02-26 09:58:53 +01:00
Thomas Faber 25b22131ca
[HDAUDBUS] Correctly mask register values.
See https://github.com/haiku/haiku/blob/master/src/add-ons/kernel/drivers/audio/hda/hda_controller.cpp
and https://github.com/haiku/haiku/blob/master/src/add-ons/kernel/drivers/audio/hda/driver.h#L118-L140

This fixes various device reset failures and probably other issues.
2019-02-26 09:51:48 +01:00
Thomas Faber 584baf79d9
[HDAUDBUS] Implement PDO removal. CORE-14617 2019-02-26 09:51:38 +01:00
Thomas Faber c8c0fc8d64
[HDAUDBUS] Implement FDO removal. CORE-14617 2019-02-26 09:51:21 +01:00
Thomas Faber b05e5b0340
[HDAUDBUS] Use IoForwardIrpSynchronously instead of HDA_SyncForwardIrp. 2019-02-26 09:50:50 +01:00
Thomas Faber 789cfd3ddc
[HDAUDBUS] Forward FDO requests instead of completing them. 2019-02-26 09:20:47 +01:00
Thomas Faber ce6960b3f5
[HDAUDBUS] Use a switch for minor function codes. 2019-02-26 09:20:43 +01:00
Thomas Faber 9c7c2deff9
[HDAUDBUS] Split FDO/PDO PNP handling into separate functions. 2019-02-26 09:20:37 +01:00
Thomas Faber b65ec6ffba
[HDAUDBUS] Minor fixes:
* Add some forward-declarations
* Add some annotations
* Improve a DPRINT
2019-02-26 09:18:41 +01:00
Pierre Schweitzer 6ee2f9882c
[MSAFD] Don't leak event while querying/setting socket options 2019-02-25 22:34:29 +01:00
Pierre Schweitzer 6bc61f63f1
[MSAFD] Implement socket options SO_SNDBUF and SO_RCVBUF 2019-02-25 22:34:29 +01:00
Pierre Schweitzer 6bf5a8a43d
[AFD_APITEST] Add apitest for AFD window size options 2019-02-25 22:34:28 +01:00
Pierre Schweitzer 86483d6e22
[AFD] Don't allow caller to set broken values to window sizes
This will avoid 0-sized allocations, or -1-sized allocations.
So far, it's maxed by hard value stored in TCPIP.sys. I believe
this is not right and would deserve a true fix
2019-02-25 22:34:28 +01:00
Pierre Schweitzer bb9eec7537
[AFD] Add default window sizes on socket creation 2019-02-25 22:34:28 +01:00
Mark Jansen fa548efb41
[XDK] Remove _M_AMD64 special case 2019-02-25 20:00:35 +01:00
Mark Jansen c01fa8e9c1
[APPHELP] Implement SdbRegisterDatabase[Ex]
CORE-11301
2019-02-25 20:00:35 +01:00
Mark Jansen 28a091ac12
[APPHELP][APPHELP_APITEST] Implement SdbGetDatabaseInformation
CORE-11301
2019-02-25 20:00:34 +01:00
Mark Jansen 5c05a29d3d
[APPHELP] Implement ShimDumpCache and ShimFlushCache
These functions simply call into the Base* functions,
having a prototype that is compatible with rundll32
CORE-11301
2019-02-25 20:00:34 +01:00
Mark Jansen f2f54a052e
[SDB] Initial SdbRegisterDatabase stubs
CORE-11301
2019-02-25 20:00:34 +01:00
Mark Jansen a9bd3da299
[APPHELP_APITEST] Add a test for shim database registration
CORE-11301
2019-02-25 20:00:34 +01:00
Stanislav Motylkov 12e78a9039 [MODULES][WALLPAPERS] Fix build (#1375)
Some file names still contained space instead of underline. Addendum to 0760802.
2019-02-25 11:41:41 +01:00
Luo Yufan ca9cdce760 [TRANSLATION] Update Chinese and Traditional Chinese translations. (#1369) 2019-02-25 00:36:53 +01:00
Pierre Schweitzer f6c50cb93d
[MSAFD] Make WSPSetSockOpt() SO_RCVBUF stub return success 2019-02-24 21:25:39 +01:00
Timo Kreuzer 81727760e4 [NTOS::Mm] Fix inverted check in MiWriteProtectSystemImage 2019-02-24 20:34:02 +01:00
Dylan Navas 07608028b3 [MODULES] Fix CMakeLists.txt for wallpapers module. (#1294)
* Add all wallpapers to the ISO and can look how enable the module in ReadMe.txt
* Remove blanks in name.
* Moving to folder with same wallpaper style.
* Adding and updating CMakeLists.txt.
* Update ReadMe.txt.
2019-02-24 18:08:26 +01:00
Serge Gautherie c5d1638e1e [KMTEST] Fix 3 Clang-Cl warnings about Status and Callbacks (#502)
* 1 "warning: variable 'Status' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]"
* 2 "warning: comparison of unsigned expression < 0 is always false [-Wtautological-unsigned-zero-compare]"
* Use a consistent type for "i" and fix a comment
* Also update licence header.

CORE-14306
2019-02-24 17:53:38 +01:00
Eric Kohl 77e3fbfad5 [MMSYS] Volume page: Initialize the volume trackbar before it might be disabled because the tick marks must be visible on a disabled trackbar. 2019-02-24 17:15:13 +01:00
Eric Kohl 601b2532e1 [MMSYS] Sounds page: Update the 'Play' button and the current item in the 'Program events' treeview when a sound is selected or deselected. 2019-02-24 16:56:55 +01:00