projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix two mysterious problems with stdint types
[ardour.git]
/
libs
/
fst
/
vstwin.c
diff --git
a/libs/fst/vstwin.c
b/libs/fst/vstwin.c
index 3c1cbcce8fed7d768c8d3748d795b3295b38d729..27fb3cbead21af949eb87ed6361e4d21df356f61 100644
(file)
--- a/
libs/fst/vstwin.c
+++ b/
libs/fst/vstwin.c
@@
-8,7
+8,6
@@
#include <pthread.h>
static UINT_PTR idle_timer_id = 0;
#include <pthread.h>
static UINT_PTR idle_timer_id = 0;
-//extern char* basename(char *path); //
#else /* linux + wine */
#else /* linux + wine */
@@
-224,7
+223,7
@@
fst_new (void)
fst->n_pending_keys = 0;
fst->has_editor = 0;
#ifdef PLATFORM_WINDOWS
fst->n_pending_keys = 0;
fst->has_editor = 0;
#ifdef PLATFORM_WINDOWS
- fst->voffset =
36
;
+ fst->voffset =
50
;
fst->hoffset = 0;
#else /* linux + wine */
fst->voffset = 24;
fst->hoffset = 0;
#else /* linux + wine */
fst->voffset = 24;
@@
-320,20
+319,20
@@
fst_init (void* possible_hmodule)
return 0;
}
return 0;
}
-#ifndef PLATFORM_WINDOWS /* linux + wine */
void
fst_start_threading(void)
{
void
fst_start_threading(void)
{
+#ifndef PLATFORM_WINDOWS /* linux + wine */
if (idle_id == 0) {
gui_quit = 0;
idle_id = g_idle_add (g_idle_call, NULL);
}
if (idle_id == 0) {
gui_quit = 0;
idle_id = g_idle_add (g_idle_call, NULL);
}
-}
#endif
#endif
+}
-#ifndef PLATFORM_WINDOWS /* linux + wine */
void
fst_stop_threading(void) {
void
fst_stop_threading(void) {
+#ifndef PLATFORM_WINDOWS /* linux + wine */
if (idle_id != 0) {
gui_quit = 1;
PostQuitMessage (0);
if (idle_id != 0) {
gui_quit = 1;
PostQuitMessage (0);
@@
-341,8
+340,8
@@
fst_stop_threading(void) {
//g_source_remove(idle_id);
idle_id = 0;
}
//g_source_remove(idle_id);
idle_id = 0;
}
-}
#endif
#endif
+}
void
fst_exit (void)
void
fst_exit (void)
@@
-466,7
+465,7
@@
fst_move_window_into_view (VSTState* fst)
{
if (fst->windows_window) {
#ifdef PLATFORM_WINDOWS
{
if (fst->windows_window) {
#ifdef PLATFORM_WINDOWS
- SetWindowPos ((HWND)(fst->windows_window), 0, fst->hoffset, fst->voffset, fst->width
, fst->heigh
t, 0);
+ SetWindowPos ((HWND)(fst->windows_window), 0, fst->hoffset, fst->voffset, fst->width
+ fst->hoffset, fst->height + fst->voffse
t, 0);
#else /* linux + wine */
SetWindowPos ((HWND)(fst->windows_window), 0, 0, 0, fst->width + fst->hoffset, fst->height + fst->voffset, 0);
#endif
#else /* linux + wine */
SetWindowPos ((HWND)(fst->windows_window), 0, 0, 0, fst->width + fst->hoffset, fst->height + fst->voffset, 0);
#endif
@@
-490,9
+489,8
@@
fst_load (const char *path)
if ((strlen(path)) && (NULL != (fhandle = fst_handle_new ())))
{
char* period;
if ((strlen(path)) && (NULL != (fhandle = fst_handle_new ())))
{
char* period;
- fhandle->nameptr = strdup (path);
fhandle->path = strdup (path);
fhandle->path = strdup (path);
- fhandle->name =
strdup (g_path_get_basename(fhandle->nameptr)
);
+ fhandle->name =
g_path_get_basename(path
);
if ((period = strrchr (fhandle->name, '.'))) {
*period = '\0';
}
if ((period = strrchr (fhandle->name, '.'))) {
*period = '\0';
}
@@
-541,9
+539,8
@@
fst_unload (VSTHandle** fhandle)
(*fhandle)->path = NULL;
}
(*fhandle)->path = NULL;
}
- if ((*fhandle)->nameptr) {
- free ((*fhandle)->nameptr);
- (*fhandle)->nameptr = NULL;
+ if ((*fhandle)->name) {
+ free ((*fhandle)->name);
(*fhandle)->name = NULL;
}
(*fhandle)->name = NULL;
}