Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

窗口化缩放 Windowed Mode #135

Open
NeilTohno opened this issue Sep 12, 2021 · 25 comments
Open

窗口化缩放 Windowed Mode #135

NeilTohno opened this issue Sep 12, 2021 · 25 comments
Labels
enhancement New feature or request

Comments

@NeilTohno
Copy link
Contributor

大大好,
有时候我不需要全全屏显示,比如,需要原游戏的 2.5 倍分辨率窗口化显示,

这个可以做吗,谢谢

@Blinue Blinue added the enhancement New feature or request label Sep 12, 2021
@Blinue
Copy link
Owner

Blinue commented Sep 12, 2021

根据 Magpie 的原理,这个功能很难实现。最重要的一个限制是源窗口始终要位于前台,因此窗口化没有太大意义。我觉得要实现这个功能要搞的非常复杂

@NeilTohno
Copy link
Contributor Author

根据 Magpie 的原理,这个功能很难实现。最重要的一个限制是源窗口始终要位于前台,因此窗口化没有太大意义。我觉得要实现这个功能要搞的非常复杂

我只想起 win10 的放大镜,那如果实现不了就算了,

谢谢。

@ParanoiaIsGreat
Copy link

有的游戏我也不想全屏。。想了下要不试试win10虚拟机?但是虚拟机本身就挺麻烦的。。

@NeilTohno
Copy link
Contributor Author

根据 Magpie 的原理,这个功能很难实现。最重要的一个限制是源窗口始终要位于前台,因此窗口化没有太大意义。我觉得要实现这个功能要搞的非常复杂

这个感觉就够了

{ "name": "FSRCNNX_LineArt_M2", "effects": [ { "effect": "FSRCNNX_LineArt", }, { "effect": "SSimDownscaler", "scale": [ -0.75, -0.75 ], "variant": 1 } ] },

@Blinue
Copy link
Owner

Blinue commented Dec 12, 2021

有一个类似的窗口化的项目 https://github.com/mausimus/ShaderGlass ,不过没有实现光标映射

总结来说,窗口化有一些困难:

  1. 光标映射是最棘手的,解决起来比较复杂。当光标进入 Magpie 窗口时,需要将光标移到源窗口的对应位置,然后将光标隐藏,自己绘制光标,用起来违和感不会很大
  2. 关于源窗口始终要位于前台的问题也有解决办法,使 Magpie 窗口和源窗口状态同步,或者当光标进入放大的窗口时自动激活源窗口
  3. 还有一个棘手的问题的是源窗口大小改变时所有 d3d 资源都要重新申请,目前没有这样的处理逻辑

窗口化并非不可能,但要花很多功夫,我计划优先实现计算着色器

@Chocoarasi
Copy link

在使用surface时,放大后触屏点击程序源窗口外的位置时,无法正确点击对应位置

@Blinue
Copy link
Owner

Blinue commented Apr 5, 2022

在使用surface时,放大后触屏点击程序源窗口外的位置时,无法正确点击对应位置

#218 (comment)

@artifoxel
Copy link

Hi, I have a small workaround solution using AutoHotkey WinMove command.

A 1080p game window on a 4k screen.

irfran0002 1080p_windowed

After execute WinMove, Magpie_Host, , 62, 718, 2560, 1440.

irfran0001 winmove_scaled_1440p

The scaled ouput overlays the original window as desired. 🦊

@Blinue
Copy link
Owner

Blinue commented Apr 26, 2022

目前最棘手的光标问题已经解决 #254 (comment) ,支持窗口化是迟早的事。这是一个重要的功能,但优先级不高,接下来的两个版本都不会实现。

@WingGao
Copy link

WingGao commented Jun 13, 2022

期待该功能 边玩游戏变看攻略 很需要的

@NeilTohno
Copy link
Contributor Author

期待该功能 边玩游戏变看攻略 很需要的

A卡驱动带浏览器,你可以用那个,哈哈

@mustssr
Copy link

mustssr commented Aug 26, 2022

试了下Lossless Scaling学习版的窗口模式,鼠标完全是不可用状态

@Joackk
Copy link

Joackk commented Jan 14, 2024

I also have the same demand, may I ask how the problem is now?

@Blinue
Copy link
Owner

Blinue commented Jan 14, 2024

v1.0 发布之前没有实现窗口化的计划,请耐心等待。

@hooke007 hooke007 changed the title 窗口化缩放 窗口化缩放 Windowed Mode Jan 21, 2024
@Kanadeforever
Copy link

Kanadeforever commented Mar 28, 2024

有一个日本软件可实现类似功能,叫蜃気楼

或可作为参考

@Blinue
Copy link
Owner

Blinue commented Apr 2, 2024

有一个日本软件可实现类似功能,叫蜃気楼

或可作为参考

谢谢推荐。这个软件 bug 有点多,优点是可以拖动窗口,其他方面体验不好。

dwm 捕获似乎是 DWM Thumbnail (DwmRegisterThumbnail 或未公开的 DwmCreateSharedThumbnailVisual),这个接口不支持自定义缩放算法。

全屏时用了一个我以前尝试过但放弃了的方案,就是将光标事件转发给源窗口。我不使用这个方案的原因是兼容性不好,调用 GetCursorPos 就露馅了。

@CberYellowstone
Copy link

这个对实现本功能有帮助吗 powertoys/crop-and-lock

@Blinue
Copy link
Owner

Blinue commented Apr 26, 2024

这个对实现本功能有帮助吗 powertoys/crop-and-lock

Crop And Lock 的原理是使用 SetParent 把源窗口变为子窗口,这个做法有点疯狂,难以想象是微软官方出品。实际上兼容性也确实很差。

@tuuyjj
Copy link

tuuyjj commented May 22, 2024

真的非常需要窗口化,全屏效率太低了......只能再买块显示器了

@silkbad
Copy link

silkbad commented Jun 5, 2024

窗口模式也是我最希望看到的功能。有没有可能让我们可以调整窗口的大小,不仅可以变大,还可以变小?我能想象这样做可能会遇到一些困难,比如要把原来的窗口隐藏在哪里。无论如何,我非常喜欢这个程序,真心感谢开发人员的辛勤工作。

@Blinue
Copy link
Owner

Blinue commented Jun 5, 2024

窗口模式也是我最希望看到的功能。有没有可能让我们可以调整窗口的大小,不仅可以变大,还可以变小?我能想象这样做可能会遇到一些困难,比如要把原来的窗口隐藏在哪里。无论如何,我非常喜欢这个程序,真心感谢开发人员的辛勤工作。

计划是可以调整缩放窗口的大小,但做不到比源窗口还小

@CberYellowstone
Copy link

CberYellowstone commented Jun 12, 2024

窗口模式也是我最希望看到的功能。有没有可能让我们可以调整窗口的大小,不仅可以变大,还可以变小?我能想象这样做可能会遇到一些困难,比如要把原来的窗口隐藏在哪里。无论如何,我非常喜欢这个程序,真心感谢开发人员的辛勤工作。

如果只要变小的话powertoys/crop-and-lock就能满足你的要求了

@silkbad
Copy link

silkbad commented Jun 13, 2024

Windowed mode is also a feature I would like to see the most. Is it possible to resize the window, not only larger, but also smaller? I can imagine that there might be some difficulties in doing so, such as where to hide the original window. In any case, I like this program very much and really appreciate the hard work of the developer.

If you just want to make it smaller, powertoys/crop-and-lock can meet your requirements.

Thank you for the tip. I had not tried this utility. I'm impressed that it's able to successfully resize/shrink my normally fixed-size window even though it's a very old game (Pokemon World Online) which uses D3D6 and old obsolete dependencies. Impressive also that it adds corner-drag resizing. However 'Crop-And-Lock' won't be a great solution for normal gaming use due to the fact that the resized window is just a duplicate window (similar to a camera viewfinder) that doesn't allow keyboard input or mouse clicking on things and can't be interacted with directly. I could hide the original window off-screen but it needs to be visible to click on things. For my own use I have found an adequate solution for playing in a shrunken window, which is to run the game in Oracle Virtualbox. However this is time-consuming to set up (requires installing Windows).

To explain my motivations: a long-term goal of mine is to find an easy all-in-one solution for Full-Screen and Windowed play that I can share and publicize with others to attract activity and new players back to Pokemon World Online which is old and dying. To protect my sunk-cost of far too much time wasted playing it (fallacies be damned). Towards that end I have already shared Magpie very enthusiastically (if curious- https://forum.pokemon-world-online.com/index.php?threads/full-screen-tutorial-for-pwo-easy-2-minutes-new-version-works-for-everybody.38869/ . As you can see my thread is confusing because there are multiple different apps/solutions for Full-Screen, for Windowed mode, for Windows 7, and for shrinkable windows / corner-drag resizing. However shrinking/corner-dragging are just nice-to-haves and I'm mainly just excited for Windowed Mode. Note that I am just a player, not staff or owner of this game, and it's a non-profit free game. Sorry that this is way too much information :).

___________ Translated:

谢谢你的提示。我之前没有尝试过这个工具。我很惊讶它竟然能成功调整/缩小我那通常是固定大小的窗口,尽管这是一个非常老的游戏(口袋妖怪世界在线),使用的是D3D6和一些陈旧的依赖项。同样令人印象深刻的是它添加了角拖动调整大小的功能。不过“Crop-And-Lock”对正常游戏使用来说不是一个好的解决方案,因为调整大小后的窗口只是一个重复的窗口(类似于相机取景器),不能接收键盘输入或鼠标点击,无法直接与之交互。我可以将原始窗口隐藏在屏幕之外,但它需要可见才能点击。对于我自己来说,我已经找到一个在缩小窗口中玩游戏的合适解决方案,就是在Oracle Virtualbox中运行游戏。然而,这需要一些时间来设置(需要安装Windows)。

为了说明我的动机:我的一个长期目标是找到一个简单的全能解决方案,可以在全屏和窗口模式下运行,我可以分享并宣传给其他人,以吸引更多的活动和新玩家回到这个已经老化和逐渐消亡的口袋妖怪世界在线游戏中。为了保护我在这上面浪费的时间(谬误该死)。为此,我已经非常热情地分享了Magpie(如果好奇的话,请看https://forum.pokemon-world-online.com/index.php?threads/full-screen-tutorial-for-pwo-easy-2-minutes-new-version-works-for-everybody.38869/)。如你所见,我的帖子很混乱,因为全屏、窗口模式、Windows 7以及可缩放窗口/角拖动调整大小有多种不同的应用/解决方案。不过缩小/角拖动只是锦上添花,我主要还是对窗口模式感到兴奋。请注意,我只是一个玩家,不是这个游戏的员工或所有者,而且这是一个非营利的免费游戏。抱歉,这里信息量太大了 :)。

@CberYellowstone
Copy link

CberYellowstone commented Jun 13, 2024

Windowed mode is also a feature I would like to see the most. Is it possible to resize the window, not only larger, but...

Reparent Mode seems can be interacted(win ctrl shift R mode)

@silkbad
Copy link

silkbad commented Jun 13, 2024

Windowed mode is also a feature I would like to see the most. Is it possible to resize the window, not only larger, but...

Reparent Mode seems can be interacted(win ctrl shift R mode)

Reparent can be interacted with but not with any resizing. Better to use the original window in that case, unless cropping is desired.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Todo
Development

No branches or pull requests