Skip to content

Commit

Permalink
Merge branch 'dev41' into unicode
Browse files Browse the repository at this point in the history
  • Loading branch information
starg2 committed Sep 1, 2021
2 parents decbbd2 + e55e350 commit 93c9f37
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 15 deletions.
26 changes: 17 additions & 9 deletions interface/w32g_new_console.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,21 +77,29 @@ bool CopyTextToClipboard(TStringView text)
if (hGlobal)
{
auto p = reinterpret_cast<LPTSTR>(::GlobalLock(hGlobal));
text.copy(p, text.size());
p[text.size()] = _T('\0');
::GlobalUnlock(hGlobal);

::EmptyClipboard();
if (p)
{
text.copy(p, text.size());
p[text.size()] = _T('\0');
::GlobalUnlock(hGlobal);

::EmptyClipboard();

#ifdef UNICODE
UINT format = CF_UNICODETEXT;
UINT format = CF_UNICODETEXT;
#else
UINT format = CF_TEXT;
UINT format = CF_TEXT;
#endif

if (::SetClipboardData(format, hGlobal))
{
ret = true;
if (::SetClipboardData(format, hGlobal))
{
ret = true;
}
else
{
::GlobalFree(hGlobal);
}
}
else
{
Expand Down
2 changes: 2 additions & 0 deletions interface/w32g_subwin3.c
Original file line number Diff line number Diff line change
Expand Up @@ -2514,6 +2514,8 @@ TracerCanvasWndProc(HWND hwnd, UINT uMess, WPARAM wParam, LPARAM lParam)
NULL
);

SetWindowPos(w32g_tracer_wnd.hTool, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);

TTTOOLINFO ti = {0};
ti.cbSize = sizeof(ti);
ti.uFlags = TTF_SUBCLASS;
Expand Down
6 changes: 3 additions & 3 deletions ogg/include/ogg/os_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@

# include <sys/types.h>
typedef int16_t ogg_int16_t;
typedef uint16_t ogg_uint16_t;
typedef u_int16_t ogg_uint16_t;
typedef int32_t ogg_int32_t;
typedef uint32_t ogg_uint32_t;
typedef u_int32_t ogg_uint32_t;
typedef int64_t ogg_int64_t;
typedef uint64_t ogg_uint64_t;
typedef u_int64_t ogg_uint64_t;

#elif defined(__HAIKU__)

Expand Down
9 changes: 7 additions & 2 deletions ogg/src/framing.c
Original file line number Diff line number Diff line change
Expand Up @@ -597,9 +597,14 @@ char *ogg_sync_buffer(ogg_sync_state *oy, long size){

if(size>oy->storage-oy->fill){
/* We need to extend the internal buffer */
long newsize=size+oy->fill+4096; /* an extra page to be nice */
long newsize;
void *ret;

if(size>INT_MAX-4096-oy->fill){
ogg_sync_clear(oy);
return NULL;
}
newsize=size+oy->fill+4096; /* an extra page to be nice */
if(oy->data)
ret=_ogg_realloc(oy->data,newsize);
else
Expand Down Expand Up @@ -1564,7 +1569,7 @@ void test_pack(const int *pl, const int **headers, int byteskip,
byteskipcount=byteskip;
}

ogg_sync_wrote(&oy,next-buf);
ogg_sync_wrote(&oy,(long)(next-buf));

while(1){
int ret=ogg_sync_pageout(&oy,&og_de);
Expand Down
2 changes: 1 addition & 1 deletion timidity/filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -4099,7 +4099,7 @@ static void sample_filter_LPF24_batch(int batch_size, FILTER_T **dcs, FILTER_T *
_mm_castsi128_pd(_mm_unpackhi_epi32(vmask32, vmask32)),
1
);
vdas[0] = _mm256_sub_pd(vsps[k], _mm256_mul_pd(vdc2, vdb4));
vdas[0] = _mm256_sub_pd(vsps[k], _mm256_mul_pd(vdc[2], vdb[4]));
#endif

vdas[1] = vdb[1];
Expand Down

0 comments on commit 93c9f37

Please sign in to comment.